diff options
| -rw-r--r-- | graphics/managed_surface.h | 15 | 
1 files changed, 14 insertions, 1 deletions
diff --git a/graphics/managed_surface.h b/graphics/managed_surface.h index 422b4610be..a7cf70f857 100644 --- a/graphics/managed_surface.h +++ b/graphics/managed_surface.h @@ -368,9 +368,22 @@ public:  		addDirtyRect(area);  		return _innerSurface.getSubArea(area);  	} + +	/** +	 * Convert the data to another pixel format. +	 * +	 * This works in-place. This means it will not create an additional buffer +	 * for the conversion process. The value of 'pixels' might change though +	 * (that means it might realloc the pixel data). +	 * +	 * @param dstFormat The desired format +	 * @param palette   The palette (in RGB888), if the source format has a Bpp of 1 +	 */ +	void convertToInPlace(const PixelFormat &dstFormat, const byte *palette = 0) { +		_innerSurface.convertToInPlace(dstFormat, palette); +	}  };  } // End of namespace Graphics -  #endif  | 
