diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 14:00:00 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 14:00:00 +0000 |
commit | 43089142d5d1da5b256a73e0fb417e760f2313d2 (patch) | |
tree | ccdcc9ff287073fa5d7d48e99415e305e405e18b /skia/ext/bitmap_platform_device_linux.h | |
parent | 16742caeda452a8523204ce48e2cd5249e24cbd1 (diff) | |
download | chromium_src-43089142d5d1da5b256a73e0fb417e760f2313d2.zip chromium_src-43089142d5d1da5b256a73e0fb417e760f2313d2.tar.gz chromium_src-43089142d5d1da5b256a73e0fb417e760f2313d2.tar.bz2 |
BitmapPlatformDevice multiply-inherits from PlatformDevice and SkDevice, in
that order. However, a newly-created BitmapPlatformDevice is often upcast to
an SkDevice, and owning pointers are stored to it as an SkDevice. All the
relevant destructors are virtual, so it can safely be deleted polymorphically.
However, valgrind doesn't know that, and at program exit some
BitmapPlatformDevices are still reachable only as SkDevices, pointing to the
middle of the BitmapPlatformDevice.
The real solution would be to get rid of the MI, but for now just switching
the base classes around causes valgrind to shut up, since we're now owning
the object through the same pointer that we got from new. This moves the
memory in valgrind from "possibly lost" to "still reachable".
BUG=105744
TEST=see valgrind output, check that errors go away
Review URL: https://chromiumcodereview.appspot.com/9900001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/bitmap_platform_device_linux.h')
-rw-r--r-- | skia/ext/bitmap_platform_device_linux.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/skia/ext/bitmap_platform_device_linux.h b/skia/ext/bitmap_platform_device_linux.h index 02132f0..1ab85d4 100644 --- a/skia/ext/bitmap_platform_device_linux.h +++ b/skia/ext/bitmap_platform_device_linux.h @@ -57,7 +57,7 @@ namespace skia { // shared memory between the renderer and the main process at least. In this // case we'll probably create the buffer from a precreated region of memory. // ----------------------------------------------------------------------------- -class BitmapPlatformDevice : public PlatformDevice, public SkDevice { +class BitmapPlatformDevice : public SkDevice, public PlatformDevice { // A reference counted cairo surface class BitmapPlatformDeviceData; |