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

Unified Diff: Source/platform/graphics/Canvas2DLayerBridge.h

Issue 358893002: Use newImageSnapshot() to get an image from a Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Again in StaticBitmapPattern Created 6 years, 3 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: Source/platform/graphics/Canvas2DLayerBridge.h
diff --git a/Source/platform/graphics/Canvas2DLayerBridge.h b/Source/platform/graphics/Canvas2DLayerBridge.h
index 3b93e43218888a143ab399bf878e258fa15f5bc3..31732573003ad7db6daf7f50999280379640fdb6 100644
--- a/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -26,8 +26,6 @@
#ifndef Canvas2DLayerBridge_h
#define Canvas2DLayerBridge_h
-#include "SkDeferredCanvas.h"
-#include "SkImage.h"
#include "platform/PlatformExport.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/ImageBufferSurface.h"
@@ -35,6 +33,8 @@
#include "public/platform/WebExternalTextureLayerClient.h"
#include "public/platform/WebExternalTextureMailbox.h"
#include "third_party/khronos/GLES2/gl2.h"
+#include "third_party/skia/include/core/SkImage.h"
+#include "third_party/skia/include/utils/SkDeferredCanvas.h"
#include "wtf/DoublyLinkedList.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefCounted.h"
@@ -91,6 +91,8 @@ public:
void beginDestruction();
+ PassRefPtr<SkImage> newImageSnapshot();
+
protected:
Canvas2DLayerBridge(PassOwnPtr<WebGraphicsContext3DProvider>, PassOwnPtr<SkDeferredCanvas>, PassRefPtr<SkSurface>, int, OpacityMode);
void setRateLimitingEnabled(bool);

Powered by Google App Engine
This is Rietveld 408576698