Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 2054643003: Remove duplication of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebase) Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index 841a2ea4ea92d73524c02e32082db48001097da1..63ede0ac4007cc9ff844fb4178a59c7ffc7f0bdd 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -28,6 +28,7 @@
#define Image_h
#include "platform/PlatformExport.h"
+#include "platform/SharedBuffer.h"
#include "platform/geometry/IntRect.h"
#include "platform/graphics/Color.h"
#include "platform/graphics/GraphicsTypes.h"
@@ -54,7 +55,6 @@ class FloatRect;
class FloatSize;
class GraphicsContext;
class Length;
-class SharedBuffer;
class Image;
class PLATFORM_EXPORT Image : public RefCounted<Image> {
@@ -101,14 +101,14 @@ public:
int height() const { return size().height(); }
virtual bool getHotSpot(IntPoint&) const { return false; }
- bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived);
+ virtual bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived);
virtual bool dataChanged(bool /*allDataReceived*/) { return false; }
virtual String filenameExtension() const { return String(); } // null string if unknown
virtual void destroyDecodedData() = 0;
- SharedBuffer* data() { return m_encodedImageData.get(); }
+ virtual PassRefPtr<SharedBuffer> data() { return m_encodedImageData; }
// Animation begins whenever someone draws the image, so startAnimation() is not normally called.
// It will automatically pause once all observers no longer want to render the image anywhere.

Powered by Google App Engine
This is Rietveld 408576698