summaryrefslogtreecommitdiffstats
path: root/skia/ext
diff options
context:
space:
mode:
authorsenorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 14:00:00 +0000
committersenorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 14:00:00 +0000
commit43089142d5d1da5b256a73e0fb417e760f2313d2 (patch)
treeccdcc9ff287073fa5d7d48e99415e305e405e18b /skia/ext
parent16742caeda452a8523204ce48e2cd5249e24cbd1 (diff)
downloadchromium_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')
-rw-r--r--skia/ext/bitmap_platform_device_android.h2
-rw-r--r--skia/ext/bitmap_platform_device_linux.h2
-rw-r--r--skia/ext/bitmap_platform_device_mac.h2
-rw-r--r--skia/ext/bitmap_platform_device_win.h2
-rw-r--r--skia/ext/vector_platform_device_emf_win.h2
-rw-r--r--skia/ext/vector_platform_device_skia.h2
6 files changed, 6 insertions, 6 deletions
diff --git a/skia/ext/bitmap_platform_device_android.h b/skia/ext/bitmap_platform_device_android.h
index 50272eb..b5755cb 100644
--- a/skia/ext/bitmap_platform_device_android.h
+++ b/skia/ext/bitmap_platform_device_android.h
@@ -18,7 +18,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 {
public:
// Construct a BitmapPlatformDevice. |is_opaque| should be set if the caller
// knows the bitmap will be completely opaque and allows some optimizations.
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;
diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h
index 97d3582..2725b6b 100644
--- a/skia/ext/bitmap_platform_device_mac.h
+++ b/skia/ext/bitmap_platform_device_mac.h
@@ -26,7 +26,7 @@ namespace skia {
// For us, that other bitmap will become invalid as soon as the device becomes
// invalid, which may lead to subtle bugs. Therefore, DO NOT ASSIGN THE
// DEVICE'S PIXEL DATA TO ANOTHER BITMAP, make sure you copy instead.
-class SK_API BitmapPlatformDevice : public PlatformDevice, public SkDevice {
+class SK_API BitmapPlatformDevice : public SkDevice, public PlatformDevice {
public:
// Creates a BitmapPlatformDevice instance. |is_opaque| should be set if the
// caller knows the bitmap will be completely opaque and allows some
diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h
index 5c416a1..b824369 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.h
@@ -26,7 +26,7 @@ namespace skia {
// For us, that other bitmap will become invalid as soon as the device becomes
// invalid, which may lead to subtle bugs. Therefore, DO NOT ASSIGN THE
// DEVICE'S PIXEL DATA TO ANOTHER BITMAP, make sure you copy instead.
-class SK_API BitmapPlatformDevice : public PlatformDevice, public SkDevice {
+class SK_API BitmapPlatformDevice : public SkDevice, public PlatformDevice {
public:
// Factory function. The screen DC is used to create the bitmap, and will not
// be stored beyond this function. is_opaque should be set if the caller
diff --git a/skia/ext/vector_platform_device_emf_win.h b/skia/ext/vector_platform_device_emf_win.h
index 1d7e5a9a..8cb9f69 100644
--- a/skia/ext/vector_platform_device_emf_win.h
+++ b/skia/ext/vector_platform_device_emf_win.h
@@ -18,7 +18,7 @@ namespace skia {
// SkCanvas to draw into. This specific device is not not backed by a surface
// and is thus unreadable. This is because the backend is completely vectorial.
// This device is a simple wrapper over a Windows device context (HDC) handle.
-class VectorPlatformDeviceEmf : public PlatformDevice, public SkDevice {
+class VectorPlatformDeviceEmf : public SkDevice, public PlatformDevice {
public:
SK_API static SkDevice* CreateDevice(int width, int height, bool isOpaque,
HANDLE shared_section);
diff --git a/skia/ext/vector_platform_device_skia.h b/skia/ext/vector_platform_device_skia.h
index 3db7561..d156404 100644
--- a/skia/ext/vector_platform_device_skia.h
+++ b/skia/ext/vector_platform_device_skia.h
@@ -20,7 +20,7 @@ namespace skia {
class BitmapPlatformDevice;
-class VectorPlatformDeviceSkia : public PlatformDevice, public SkPDFDevice {
+class VectorPlatformDeviceSkia : public SkPDFDevice, public PlatformDevice {
public:
SK_API VectorPlatformDeviceSkia(const SkISize& pageSize,
const SkISize& contentSize,