aboutsummaryrefslogtreecommitdiff
path: root/graphics/managed_surface.h
diff options
context:
space:
mode:
authorLe Philousophe2019-06-09 12:52:20 +0200
committerPaul Gilbert2019-06-09 14:38:31 -0700
commit1297ae2b76ca48e433de6e54922945880251ab3c (patch)
treef08e91bd74bca5b85857ab36e516be464efc5c6c /graphics/managed_surface.h
parentbdbad1f3af0e34e992f1b86ad21e351e9cd4e101 (diff)
downloadscummvm-rg350-1297ae2b76ca48e433de6e54922945880251ab3c.tar.gz
scummvm-rg350-1297ae2b76ca48e433de6e54922945880251ab3c.tar.bz2
scummvm-rg350-1297ae2b76ca48e433de6e54922945880251ab3c.zip
GRAPHICS: Fix ManagedSurface::copyFrom memory handling
When calling ManagedSurface::copyFrom, _disposeAfterUse should be set to YES because inner surface frees up old pixels array and creates a new one.
Diffstat (limited to 'graphics/managed_surface.h')
-rw-r--r--graphics/managed_surface.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/graphics/managed_surface.h b/graphics/managed_surface.h
index a11d05c557..c143222bbc 100644
--- a/graphics/managed_surface.h
+++ b/graphics/managed_surface.h
@@ -307,10 +307,7 @@ public:
* Copy the data from another Surface, reinitializing the
* surface to match the dimensions of the passed surface
*/
- void copyFrom(const ManagedSurface &surf) {
- clearDirtyRects();
- _innerSurface.copyFrom(surf._innerSurface);
- }
+ void copyFrom(const ManagedSurface &surf);
/**
* Draw a line.