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

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

Issue 2584643002: Revamp OffscreenCanvas commit flow (Closed)
Patch Set: rebase and fix conflict Created 4 years 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 41dedd92df52483a2285fbc11473ef26c380cbf2..7c971e37a3ba6bfe1b831d365de0927a3731c549 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -73,13 +73,15 @@ class
typedef CanvasRenderingContext2DOrWebGLRenderingContextOrWebGL2RenderingContextOrImageBitmapRenderingContext
RenderingContext;
-class CORE_EXPORT HTMLCanvasElement final : public HTMLElement,
- public ContextLifecycleObserver,
- public PageVisibilityObserver,
- public CanvasImageSource,
- public ImageBufferClient,
- public ImageBitmapSource,
- public OffscreenCanvasPlaceholder {
+class CORE_EXPORT HTMLCanvasElement final
+ : public HTMLElement,
+ public ContextLifecycleObserver,
+ public PageVisibilityObserver,
+ public CanvasImageSource,
+ public CanvasSurfaceLayerBridgeObserver,
+ public ImageBufferClient,
+ public ImageBitmapSource,
+ public OffscreenCanvasPlaceholder {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(HTMLCanvasElement);
USING_PRE_FINALIZER(HTMLCanvasElement, dispose);
@@ -187,6 +189,9 @@ class CORE_EXPORT HTMLCanvasElement final : public HTMLElement,
int sourceWidth() override { return m_size.width(); }
int sourceHeight() override { return m_size.height(); }
+ // CanvasSurfaceLayerBridgeObserver implementation
+ void OnWebLayerReplaced() override;
+
// ImageBufferClient implementation
void notifySurfaceInvalid() override;
bool isDirty() override { return !m_dirtyRect.isEmpty(); }
@@ -229,7 +234,7 @@ class CORE_EXPORT HTMLCanvasElement final : public HTMLElement,
CanvasSurfaceLayerBridge* surfaceLayerBridge() const {
return m_surfaceLayerBridge.get();
}
- bool createSurfaceLayer();
+ void createLayer();
void detachContext() { m_context = nullptr; }

Powered by Google App Engine
This is Rietveld 408576698