[Scummvm-git-logs] scummvm master -> c4686ee84cb4fa274950d06d6dfc524b06cd474b
aquadran
noreply at scummvm.org
Thu Feb 9 06:31:17 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c4686ee84c TINYGL: Rename copyToBuffer to copyFromFrameBuffer
Commit: c4686ee84cb4fa274950d06d6dfc524b06cd474b
https://github.com/scummvm/scummvm/commit/c4686ee84cb4fa274950d06d6dfc524b06cd474b
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2023-02-09T07:31:09+01:00
Commit Message:
TINYGL: Rename copyToBuffer to copyFromFrameBuffer
Changed paths:
engines/grim/gfx_tinygl.cpp
engines/myst3/gfx_tinygl.cpp
engines/stark/gfx/tinygl.cpp
graphics/tinygl/tinygl.h
graphics/tinygl/zbuffer.cpp
graphics/tinygl/zbuffer.h
diff --git a/engines/grim/gfx_tinygl.cpp b/engines/grim/gfx_tinygl.cpp
index ecb6bdfb7f0..61a0b9e5263 100644
--- a/engines/grim/gfx_tinygl.cpp
+++ b/engines/grim/gfx_tinygl.cpp
@@ -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() {
diff --git a/engines/myst3/gfx_tinygl.cpp b/engines/myst3/gfx_tinygl.cpp
index 4d1543da251..75c121ac8eb 100644
--- a/engines/myst3/gfx_tinygl.cpp
+++ b/engines/myst3/gfx_tinygl.cpp
@@ -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() {
diff --git a/engines/stark/gfx/tinygl.cpp b/engines/stark/gfx/tinygl.cpp
index 1f7efc5ec30..616acce266f 100644
--- a/engines/stark/gfx/tinygl.cpp
+++ b/engines/stark/gfx/tinygl.cpp
@@ -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();
diff --git a/graphics/tinygl/tinygl.h b/graphics/tinygl/tinygl.h
index bb95620e6e8..40729c13206 100644
--- a/graphics/tinygl/tinygl.h
+++ b/graphics/tinygl/tinygl.h
@@ -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
diff --git a/graphics/tinygl/zbuffer.cpp b/graphics/tinygl/zbuffer.cpp
index 953c7843d17..9f045ba63a9 100644
--- a/graphics/tinygl/zbuffer.cpp
+++ b/graphics/tinygl/zbuffer.cpp
@@ -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
diff --git a/graphics/tinygl/zbuffer.h b/graphics/tinygl/zbuffer.h
index 797062d24b0..3f5861ca438 100644
--- a/graphics/tinygl/zbuffer.h
+++ b/graphics/tinygl/zbuffer.h
@@ -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);
More information about the Scummvm-git-logs
mailing list