[Scummvm-git-logs] scummvm master -> 0ca414daa080a5db548ee522308342d6058ce636

aquadran noreply at scummvm.org
Sat Jul 16 23:35:25 UTC 2022


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:
0ca414daa0 TINYGL: Removed few more forced inlines


Commit: 0ca414daa080a5db548ee522308342d6058ce636
    https://github.com/scummvm/scummvm/commit/0ca414daa080a5db548ee522308342d6058ce636
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-07-17T01:35:19+02:00

Commit Message:
TINYGL: Removed few more forced inlines

Changed paths:
    graphics/tinygl/zblit.cpp
    graphics/tinygl/zbuffer.h
    graphics/tinygl/zline.cpp


diff --git a/graphics/tinygl/zblit.cpp b/graphics/tinygl/zblit.cpp
index 4ef663a2686..8a9a65b5adf 100644
--- a/graphics/tinygl/zblit.cpp
+++ b/graphics/tinygl/zblit.cpp
@@ -136,7 +136,7 @@ public:
 		}
 	};
 
-	FORCEINLINE bool clipBlitImage(TinyGL::GLContext *c, int &srcX, int &srcY, int &srcWidth, int &srcHeight, int &width, int &height, int &dstX, int &dstY, int &clampWidth, int &clampHeight) {
+	bool clipBlitImage(TinyGL::GLContext *c, int &srcX, int &srcY, int &srcWidth, int &srcHeight, int &width, int &height, int &dstX, int &dstY, int &clampWidth, int &clampHeight) {
 		if (srcWidth == 0 || srcHeight == 0) {
 			srcWidth = _surface.w;
 			srcHeight = _surface.h;
@@ -213,21 +213,21 @@ public:
 	}
 
 	template <bool kDisableColoring, bool kDisableBlending, bool kEnableAlphaBlending>
-	FORCEINLINE void tglBlitRLE(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint);
+	void tglBlitRLE(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint);
 
 	template <bool kDisableBlending, bool kDisableColoring, bool kFlipVertical, bool kFlipHorizontal>
-	FORCEINLINE void tglBlitSimple(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint);
+	void tglBlitSimple(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint);
 
 	template <bool kDisableBlending, bool kDisableColoring, bool kFlipVertical, bool kFlipHorizontal>
-	FORCEINLINE void tglBlitScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint);
+	void tglBlitScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint);
 
 	template <bool kDisableBlending, bool kDisableColoring, bool kFlipVertical, bool kFlipHorizontal>
-	FORCEINLINE void tglBlitRotoScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, int rotation,
-	                                  int originX, int originY, float aTint, float rTint, float gTint, float bTint);
+	void tglBlitRotoScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, int rotation,
+	                      int originX, int originY, float aTint, float rTint, float gTint, float bTint);
 
 	//Utility function that calls the correct blitting function.
 	template <bool kDisableBlending, bool kDisableColoring, bool kDisableTransform, bool kFlipVertical, bool kFlipHorizontal, bool kEnableAlphaBlending>
-	FORCEINLINE void tglBlitGeneric(const BlitTransform &transform) {
+	void tglBlitGeneric(const BlitTransform &transform) {
 		if (kDisableTransform) {
 			if ((kDisableBlending || kEnableAlphaBlending) && kFlipVertical == false && kFlipHorizontal == false) {
 				tglBlitRLE<kDisableColoring, kDisableBlending, kEnableAlphaBlending>(transform._destinationRectangle.left,
@@ -311,7 +311,7 @@ namespace TinyGL {
 // This blit only supports tinting but it will fall back to simpleBlit
 // if flipping is required (or anything more complex than that, including rotationd and scaling).
 template <bool kDisableColoring, bool kDisableBlending, bool kEnableAlphaBlending>
-FORCEINLINE void BlitImage::tglBlitRLE(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint) {
+void BlitImage::tglBlitRLE(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint) {
 	GLContext *c = gl_get_context();
 
 	int clampWidth, clampHeight;
@@ -402,7 +402,7 @@ FORCEINLINE void BlitImage::tglBlitRLE(int dstX, int dstY, int srcX, int srcY, i
 
 // This blit function is called when flipping is needed but transformation isn't.
 template <bool kDisableBlending, bool kDisableColoring, bool kFlipVertical, bool kFlipHorizontal>
-FORCEINLINE void BlitImage::tglBlitSimple(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint) {
+void BlitImage::tglBlitSimple(int dstX, int dstY, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint) {
 	GLContext *c = gl_get_context();
 
 	int clampWidth, clampHeight;
@@ -456,8 +456,8 @@ FORCEINLINE void BlitImage::tglBlitSimple(int dstX, int dstY, int srcX, int srcY
 // This function is called when scale is needed: it uses a simple nearest
 // filter to scale the blit image before copying it to the screen.
 template <bool kDisableBlending, bool kDisableColoring, bool kFlipVertical, bool kFlipHorizontal>
-FORCEINLINE void BlitImage::tglBlitScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight,
-	                                 float aTint, float rTint, float gTint, float bTint) {
+void BlitImage::tglBlitScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight,
+	                     float aTint, float rTint, float gTint, float bTint) {
 	GLContext *c = gl_get_context();
 
 	int clampWidth, clampHeight;
@@ -546,8 +546,8 @@ systems.
 */
 
 template <bool kDisableBlending, bool kDisableColoring, bool kFlipVertical, bool kFlipHorizontal>
-FORCEINLINE void BlitImage::tglBlitRotoScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, int rotation,
-	                                     int originX, int originY, float aTint, float rTint, float gTint, float bTint) {
+void BlitImage::tglBlitRotoScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, int rotation,
+	                         int originX, int originY, float aTint, float rTint, float gTint, float bTint) {
 	GLContext *c = gl_get_context();
 
 	int clampWidth, clampHeight;
diff --git a/graphics/tinygl/zbuffer.h b/graphics/tinygl/zbuffer.h
index 1dca8acc13a..ea325b9a803 100644
--- a/graphics/tinygl/zbuffer.h
+++ b/graphics/tinygl/zbuffer.h
@@ -687,10 +687,10 @@ private:
 	FORCEINLINE void putPixel(uint pixelOffset, int color, int x, int y);
 
 	template <bool kInterpRGB, bool kInterpZ, bool kDepthWrite>
-	FORCEINLINE void drawLine(const ZBufferPoint *p1, const ZBufferPoint *p2);
+	void drawLine(const ZBufferPoint *p1, const ZBufferPoint *p2);
 
 	template <bool kInterpRGB, bool kInterpZ, bool kDepthWrite, bool kEnableScissor>
-	FORCEINLINE void drawLine(const ZBufferPoint *p1, const ZBufferPoint *p2);
+	void drawLine(const ZBufferPoint *p1, const ZBufferPoint *p2);
 
 	Buffer _offscreenBuffer;
 	Graphics::PixelBuffer _pbuf;
diff --git a/graphics/tinygl/zline.cpp b/graphics/tinygl/zline.cpp
index 0b8ceb6df6d..b807809bdc6 100644
--- a/graphics/tinygl/zline.cpp
+++ b/graphics/tinygl/zline.cpp
@@ -57,7 +57,7 @@ FORCEINLINE void FrameBuffer::putPixel(uint pixelOffset, int color, int x, int y
 }
 
 template <bool kInterpRGB, bool kInterpZ, bool kDepthWrite>
-FORCEINLINE void FrameBuffer::drawLine(const ZBufferPoint *p1, const ZBufferPoint *p2) {
+void FrameBuffer::drawLine(const ZBufferPoint *p1, const ZBufferPoint *p2) {
 	if (_enableScissor)
 		drawLine<kInterpRGB, kInterpZ, kDepthWrite, true>(p1, p2);
 	else




More information about the Scummvm-git-logs mailing list