TINYGL: Rename copyToBuffer to copyFromFrameBuffer

This commit is contained in:
Paweł Kołodziejski 2023-02-09 07:31:09 +01:00
parent a6da9e4906
commit c4686ee84c
No known key found for this signature in database
GPG Key ID: 0BDADC9E74440FF7
6 changed files with 8 additions and 8 deletions

View File

@ -1259,7 +1259,7 @@ Bitmap *GfxTinyGL::getScreenshot(int w, int h, bool useStored) {
if (useStored) {
bmp = createScreenshotBitmap(_storedDisplay, w, h, true);
} else {
Graphics::Surface *src = TinyGL::copyToBuffer(_pixelFormat);
Graphics::Surface *src = TinyGL::copyFromFrameBuffer(_pixelFormat);
bmp = createScreenshotBitmap(src, w, h, true);
src->free();
delete src;
@ -1276,7 +1276,7 @@ void GfxTinyGL::storeDisplay() {
TinyGL::presentBuffer();
_storedDisplay->free();
delete _storedDisplay;
_storedDisplay = TinyGL::copyToBuffer(_pixelFormat);
_storedDisplay = TinyGL::copyFromFrameBuffer(_pixelFormat);
}
void GfxTinyGL::copyStoredToDisplay() {

View File

@ -266,7 +266,7 @@ void TinyGLRenderer::drawTexturedRect3D(const Math::Vector3d &topLeft, const Mat
}
Graphics::Surface *TinyGLRenderer::getScreenshot() {
return TinyGL::copyToBuffer(Texture::getRGBAPixelFormat());
return TinyGL::copyFromFrameBuffer(Texture::getRGBAPixelFormat());
}
void TinyGLRenderer::flipBuffer() {

View File

@ -173,7 +173,7 @@ Common::Rect TinyGLDriver::getUnscaledViewport() const {
}
Graphics::Surface *TinyGLDriver::getViewportScreenshot() const {
Graphics::Surface *tmp = TinyGL::copyToBuffer(getRGBAPixelFormat());
Graphics::Surface *tmp = TinyGL::copyFromFrameBuffer(getRGBAPixelFormat());
Graphics::Surface *s = new Graphics::Surface();
s->create(_viewport.width(), _viewport.height(), getRGBAPixelFormat());
byte *src = (byte *)tmp->getPixels();

View File

@ -35,7 +35,7 @@ void destroyContext();
void presentBuffer();
void presentBuffer(Common::List<Common::Rect> &dirtyAreas);
void getSurfaceRef(Graphics::Surface &surface);
Graphics::Surface *copyToBuffer(const Graphics::PixelFormat &dstFormat);
Graphics::Surface *copyFromFrameBuffer(const Graphics::PixelFormat &dstFormat);
} // end of namespace TinyGL

View File

@ -310,10 +310,10 @@ void getSurfaceRef(Graphics::Surface &surface) {
c->fb->getSurfaceRef(surface);
}
Graphics::Surface *copyToBuffer(const Graphics::PixelFormat &dstFormat) {
Graphics::Surface *copyFromFrameBuffer(const Graphics::PixelFormat &dstFormat) {
GLContext *c = gl_get_context();
assert(c->fb);
return c->fb->copyToBuffer(dstFormat);
return c->fb->copyFromFrameBuffer(dstFormat);
}
} // end of namespace TinyGL

View File

@ -127,7 +127,7 @@ struct FrameBuffer {
return _zbuf;
}
Graphics::Surface *copyToBuffer(const Graphics::PixelFormat &dstFormat) {
Graphics::Surface *copyFromFrameBuffer(const Graphics::PixelFormat &dstFormat) {
Graphics::Surface tmp;
tmp.init(_pbufWidth, _pbufHeight, _pbufPitch, _pbuf.getRawBuffer(), _pbufFormat);
return tmp.convertTo(dstFormat);