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

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

Issue 2849463005: Refactor ImageBuffer to make OffscreenCanvas match HTMLCanvasElement (Closed)
Patch Set: x Created 3 years, 8 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 2c443b2bf1f808d21710846edac51e45f7e56ab3..3d645dbd97ee712d8f6ffcba59d96ab6e1425b50 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -140,17 +140,16 @@ class CORE_EXPORT HTMLCanvasElement final
void Paint(GraphicsContext&, const LayoutRect&);
- PaintCanvas* DrawingCanvas() const;
- void DisableDeferral(DisableDeferralReason) const;
+ PaintCanvas* DrawingCanvas();
+ void DisableDeferral(DisableDeferralReason);
PaintCanvas* ExistingDrawingCanvas() const;
CanvasRenderingContext* RenderingContext() const { return context_.Get(); }
void EnsureUnacceleratedImageBuffer();
- ImageBuffer* Buffer() const;
PassRefPtr<Image> CopiedImage(SourceDrawingBuffer,
AccelerationHint,
- SnapshotReason) const;
+ SnapshotReason);
void ClearCopiedImage();
bool OriginClean() const;
@@ -162,12 +161,13 @@ class CORE_EXPORT HTMLCanvasElement final
bool Is2d() const;
bool IsAnimated2d() const;
- bool HasImageBuffer() const { return image_buffer_.get(); }
- void DiscardImageBuffer();
+ void DiscardImageBuffer() override;
+ ImageBuffer* GetImageBuffer() const override { return image_buffer_.get(); }
+ ImageBuffer* GetOrCreateImageBuffer() override;
bool ShouldBeDirectComposited() const;
- void PrepareSurfaceForPaintingIfNeeded() const;
+ void PrepareSurfaceForPaintingIfNeeded();
const AtomicString ImageSourceURL() const override;
@@ -189,7 +189,7 @@ class CORE_EXPORT HTMLCanvasElement final
PassRefPtr<Image> GetSourceImageForCanvas(SourceImageStatus*,
AccelerationHint,
SnapshotReason,
- const FloatSize&) const override;
+ const FloatSize&) override;
bool WouldTaintOrigin(SecurityOrigin*) const override;
FloatSize ElementSize(const FloatSize&) const override;
bool IsCanvasElement() const override { return true; }
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmap.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698