[Scummvm-git-logs] scummvm master -> 070d274bf776c5a871a8f24569d96981853afe16

aquadran aquadran at gmail.com
Tue Oct 13 20:30:43 UTC 2020


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:
070d274bf7 BACKENDS: Drop getScreenPixelBuffer() as no longer needed. (#2521)


Commit: 070d274bf776c5a871a8f24569d96981853afe16
    https://github.com/scummvm/scummvm/commit/070d274bf776c5a871a8f24569d96981853afe16
Author: Paweł Kołodziejski (aquadran at users.sourceforge.net)
Date: 2020-10-13T22:30:39+02:00

Commit Message:
BACKENDS: Drop getScreenPixelBuffer() as no longer needed. (#2521)

Changed paths:
    backends/base-backend.cpp
    backends/base-backend.h
    backends/graphics/graphics.h
    backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
    backends/graphics3d/openglsdl/openglsdl-graphics3d.h
    backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
    backends/graphics3d/surfacesdl/surfacesdl-graphics3d.h
    backends/modular-backend.cpp
    backends/modular-backend.h
    backends/platform/android3d/graphics.cpp
    backends/platform/android3d/graphics.h
    common/system.h


diff --git a/backends/base-backend.cpp b/backends/base-backend.cpp
index 98c4ce0a6a..851075ec0e 100644
--- a/backends/base-backend.cpp
+++ b/backends/base-backend.cpp
@@ -51,11 +51,6 @@ void BaseBackend::initBackend() {
 	OSystem::initBackend();
 }
 
-Graphics::PixelBuffer BaseBackend::getScreenPixelBuffer() {
-	warning("BaseBackend::getScreenPixelBuffer(): not implemented");
-	return Graphics::PixelBuffer();
-}
-
 void BaseBackend::fillScreen(uint32 col) {
 	Graphics::Surface *screen = lockScreen();
 	if (screen)
diff --git a/backends/base-backend.h b/backends/base-backend.h
index 2f5228ff0f..6269834d84 100644
--- a/backends/base-backend.h
+++ b/backends/base-backend.h
@@ -34,7 +34,6 @@ class BaseBackend : public OSystem {
 public:
 	virtual void initBackend() override;
 
-	virtual Graphics::PixelBuffer getScreenPixelBuffer() override;
 	virtual void displayMessageOnOSD(const Common::U32String &msg) override;
 	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override {}
 	virtual void fillScreen(uint32 col) override;
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index cd90389225..a548e201da 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -112,7 +112,6 @@ public:
 	//virtual void setPalette(const byte *colors, uint start, uint num) = 0;
 	//virtual void grabPalette(byte *colors, uint start, uint num) const = 0;
 
-	virtual Graphics::PixelBuffer getScreenPixelBuffer() { return Graphics::PixelBuffer(); }
 	virtual void saveScreenshot() {}
 	virtual bool lockMouse(bool lock) { return false; }
 };
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index 39114c162b..06b2752c1b 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -352,10 +352,6 @@ void OpenGLSdlGraphics3dManager::notifyResize(const int width, const int height)
 #endif
 }
 
-Graphics::PixelBuffer OpenGLSdlGraphics3dManager::getScreenPixelBuffer() {
-	error("Direct screen buffer access is not allowed when using OpenGL");
-}
-
 void OpenGLSdlGraphics3dManager::initializeOpenGLContext() const {
 	OpenGL::ContextOGLType type;
 
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
index e94ffb6404..beaf07aa83 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
@@ -76,7 +76,6 @@ public:
 #endif
 	virtual int getScreenChangeID() const override { return _screenChangeCount; }
 	virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format) override;
-	virtual Graphics::PixelBuffer getScreenPixelBuffer() override;
 	virtual int16 getHeight() const override;
 	virtual int16 getWidth() const override;
 
diff --git a/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp b/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
index d9db46a199..220b46bd64 100644
--- a/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
+++ b/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
@@ -232,10 +232,6 @@ void SurfaceSdlGraphics3dManager::createOrUpdateScreen() {
 	_screenChangeCount++;
 }
 
-Graphics::PixelBuffer SurfaceSdlGraphics3dManager::getScreenPixelBuffer() {
-	return Graphics::PixelBuffer(_screenFormat, (byte *)_subScreen->pixels);
-}
-
 void SurfaceSdlGraphics3dManager::drawOverlay() {
 	if (!_overlayscreen)
 		return;
diff --git a/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.h b/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.h
index 5b1bcc6ccf..cb73006647 100644
--- a/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.h
+++ b/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.h
@@ -54,7 +54,6 @@ public:
 #endif
 	virtual int getScreenChangeID() const override { return _screenChangeCount; }
 	virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format) override;
-	virtual Graphics::PixelBuffer getScreenPixelBuffer() override;
 	virtual int16 getHeight() const override;
 	virtual int16 getWidth() const override;
 
diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index aa848ab415..fc56b8f9fe 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -125,11 +125,7 @@ Common::List<Graphics::PixelFormat> ModularGraphicsBackend::getSupportedFormats(
 
 #endif
 
-Graphics::PixelBuffer ModularGraphicsBackend::getScreenPixelBuffer() {
-	return _graphicsManager->getScreenPixelBuffer();
-}
-
-void ModularGraphicsBackend::initSize(uint w, uint h, const Graphics::PixelFormat *format ) {
+void ModularGraphicsBackend::initSize(uint w, uint h, const Graphics::PixelFormat *format) {
 	_graphicsManager->initSize(w, h, format);
 }
 
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index 020ad96a23..eb9cce1622 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -82,7 +82,6 @@ public:
 	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override final;
 #endif
 	virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) override final;
-	virtual Graphics::PixelBuffer getScreenPixelBuffer() override;
 	virtual void initSizeHint(const Graphics::ModeList &modes) override final;
 	virtual int getScreenChangeID() const override final;
 
diff --git a/backends/platform/android3d/graphics.cpp b/backends/platform/android3d/graphics.cpp
index 9db95a23aa..1424ee1c5b 100644
--- a/backends/platform/android3d/graphics.cpp
+++ b/backends/platform/android3d/graphics.cpp
@@ -689,10 +689,6 @@ void AndroidGraphicsManager::setupScreen(uint screenW, uint screenH, bool fullsc
 	}
 }
 
-Graphics::PixelBuffer AndroidGraphicsManager::getScreenPixelBuffer() {
-	return _game_pbuf;
-}
-
 void AndroidGraphicsManager::clipMouse(Common::Point &p) const {
 	const GLESBaseTexture *tex = getActiveTexture();
 
diff --git a/backends/platform/android3d/graphics.h b/backends/platform/android3d/graphics.h
index 5d911a8a7a..5f2984e7d1 100644
--- a/backends/platform/android3d/graphics.h
+++ b/backends/platform/android3d/graphics.h
@@ -95,7 +95,6 @@ public:
 	void setupScreen(uint screenW, uint screenH, bool fullscreen, bool accel3d);
 
 	void setupScreen(uint screenW, uint screenH, bool fullscreen, bool accel3d, bool isGame);
-	virtual Graphics::PixelBuffer getScreenPixelBuffer() override;
 	void updateScreenRect();
 	const GLESBaseTexture *getActiveTexture() const;
 	void clipMouse(Common::Point &p) const;
diff --git a/common/system.h b/common/system.h
index a5c38be17f..fd52e9dc23 100644
--- a/common/system.h
+++ b/common/system.h
@@ -902,13 +902,6 @@ public:
 	 */
 	virtual TransactionError endGFXTransaction() { return kTransactionSuccess; }
 
-	/**
-	 * Return a Graphics::PixelBuffer representing the framebuffer.
-	 * The caller can then perform arbitrary graphics transformations
-	 * on the framebuffer (blitting, scrolling, etc.).
-	 */
-	virtual Graphics::PixelBuffer getScreenPixelBuffer() = 0;
-
 	/**
 	 * Returns the currently set virtual screen height.
 	 * @see initSize




More information about the Scummvm-git-logs mailing list