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

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

Issue 1610883002: Oilpan: ImageObserver needs to be a GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl try Created 4 years, 10 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 3cbc9348de429dbde17a0a4ad8da7d72d435fa9d..8ee032c702e3be9aff661e5eae7a7ceb75a163d7 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -32,6 +32,7 @@
#include "platform/graphics/Color.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/ImageAnimationPolicy.h"
+#include "platform/graphics/ImageObserver.h"
#include "platform/graphics/ImageOrientation.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "wtf/Assertions.h"
@@ -54,9 +55,6 @@ class Length;
class SharedBuffer;
class Image;
-// This class gets notified when an image creates or destroys decoded frames and when it advances animation frames.
-class ImageObserver;
-
class PLATFORM_EXPORT Image : public RefCounted<Image> {
friend class GeneratedImage;
friend class CrossfadeGeneratedImage;
@@ -164,7 +162,12 @@ protected:
private:
RefPtr<SharedBuffer> m_encodedImageData;
- ImageObserver* m_imageObserver;
+ // TODO(Oilpan): consider having Image on the Oilpan heap and
+ // turn this into a Member<>.
+ //
+ // The observer (an ImageResource) is an untraced member, with the ImageResource
+ // being responsible of clearing itself out.
+ RawPtrWillBeUntracedMember<ImageObserver> m_imageObserver;
};
#define DEFINE_IMAGE_TYPE_CASTS(typeName) \

Powered by Google App Engine
This is Rietveld 408576698