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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.h

Issue 2125853002: Replace RefPtrs with raw pointers (imageFromNode in Editor.cpp) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: impl 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/core/html/HTMLCanvasElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
index 37c79ec851a2c8a9cf5b8d3b057ce0cb3554f6fd..3b9420e400536b6e232c63c67dc6a20888addd1f 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -132,7 +132,7 @@ public:
void ensureUnacceleratedImageBuffer();
ImageBuffer* buffer() const;
- PassRefPtr<Image> copiedImage(SourceDrawingBuffer, AccelerationHint) const;
+ Image* copiedImage(SourceDrawingBuffer, AccelerationHint) const;
void clearCopiedImage();
SecurityOrigin* getSecurityOrigin() const;
@@ -238,6 +238,8 @@ private:
String toDataURLInternal(const String& mimeType, const double& quality, SourceDrawingBuffer) const;
+ Image* ensureTransparentImage() const;
+
HeapHashSet<WeakMember<CanvasDrawListener>> m_listeners;
IntSize m_size;
@@ -261,6 +263,8 @@ private:
// Used for OffscreenCanvas that controls this HTML canvas element
std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
+
+ mutable RefPtr<Image> m_transparentImage;
haraken 2016/07/06 12:46:44 Why do we need to keep alive the image after copie
hajimehoshi 2016/07/07 10:53:07 Hmm, I agree. Do you think it'd make sense if m_t
haraken 2016/07/07 11:00:56 I don't fully understand what problem you're tryin
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698