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

Unified Diff: third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Fixed expectations 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/modules/imagebitmap/ImageBitmapRenderingContext.h
diff --git a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h
index e25afe7b11a47b5d7739086510313f7e8d58197a..298b0421f1712d290494f250c2b8514c63d4d3dd 100644
--- a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h
+++ b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h
@@ -13,6 +13,7 @@
namespace blink {
class ImageBitmap;
+class ImageLayerBridge;
class MODULES_EXPORT ImageBitmapRenderingContext final
: public CanvasRenderingContext {
@@ -34,6 +35,8 @@ class MODULES_EXPORT ImageBitmapRenderingContext final
}
};
+ DECLARE_TRACE();
+
// Script API
void transferFromImageBitmap(ImageBitmap*, ExceptionState&);
@@ -43,20 +46,18 @@ class MODULES_EXPORT ImageBitmapRenderingContext final
}
void setIsHidden(bool) override {}
bool isContextLost() const override { return false; }
- bool paint(GraphicsContext&, const IntRect&) override;
void setCanvasGetContextResult(RenderingContext&) final;
- PassRefPtr<Image> getImage(AccelerationHint, SnapshotReason) const final {
- return m_image.get();
- }
+ PassRefPtr<Image> getImage(AccelerationHint, SnapshotReason) const final;
+ bool isComposited() const final { return true; }
+ bool isAccelerated() const final;
- // TODO(junov): Implement GPU accelerated rendering using a layer bridge
- WebLayer* platformLayer() const override { return nullptr; }
+ WebLayer* platformLayer() const final;
// TODO(junov): handle lost contexts when content is GPU-backed
void loseContext(LostContextMode) override {}
void stop() override;
- bool isPaintable() const final { return m_image.get(); }
+ bool isPaintable() const final;
virtual ~ImageBitmapRenderingContext();
@@ -65,7 +66,7 @@ class MODULES_EXPORT ImageBitmapRenderingContext final
const CanvasContextCreationAttributes&,
Document&);
- RefPtr<Image> m_image;
+ Member<ImageLayerBridge> m_imageLayerBridge;
};
DEFINE_TYPE_CASTS(ImageBitmapRenderingContext,

Powered by Google App Engine
This is Rietveld 408576698