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

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

Issue 1999143002: Add CanvasSurfaceLayerBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 8c23e4dcb1f07baa02d616de4a77bc60b536485b..1c72248b08640e274dd43730b87f6a8ede270bc6 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -41,6 +41,7 @@
#include "core/page/PageLifecycleObserver.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/IntSize.h"
+#include "platform/graphics/CanvasSurfaceLayerBridge.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/GraphicsTypes3D.h"
#include "platform/graphics/ImageBufferClient.h"
@@ -197,6 +198,10 @@ public:
std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoint&);
String getIdFromControl(const Element*);
+ // For OffscreenCanvas that controls this html canvas element
+ CanvasSurfaceLayerBridge* surfaceLayerBridge() const { return m_surfaceLayerBridge.get(); }
+ void createSurfaceLayerBridge();
+
protected:
void didMoveToNewDocument(Document& oldDocument) override;
@@ -246,6 +251,9 @@ private:
OwnPtr<ImageBuffer> m_imageBuffer;
mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platforms that have to copy the image buffer to render (and for CSSCanvasValue).
+
+ // Used for OffscreenCanvas that controls this HTML canvas element
+ OwnPtr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698