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

Unified Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Issue 2359723003: Implement OffscreenCanvas Accelerated 2D commit() (Closed)
Patch Set: Temporary code for Unaccelerated case Created 4 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: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
index 7bcaae2ef9140d67f40a466a8d170e41bce26de3..99ef840bc9c777d02f8a34544a2a958521b9a7af 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
@@ -22,7 +22,7 @@ public:
// OffscreenCanvasFrameDispatcher implementation.
~OffscreenCanvasFrameDispatcherImpl() override {}
- void dispatchFrame(RefPtr<StaticBitmapImage>) override;
+ void dispatchFrame(RefPtr<StaticBitmapImage>, bool isAccelerated) override;
// cc::mojom::blink::MojoCompositorFrameSinkClient implementation.
void ReturnResources(Vector<cc::mojom::blink::ReturnedResourcePtr> resources) override;
@@ -31,9 +31,13 @@ private:
const cc::SurfaceId m_surfaceId;
const int m_width;
const int m_height;
- cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink;
+ unsigned m_nextResourceId;
HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages;
+
+ bool verifyImageSize(const sk_sp<SkImage>&);
+
+ cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink;
mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding;
};

Powered by Google App Engine
This is Rietveld 408576698