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

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

Issue 2644653003: Make OffscreenCanvas animation in sync with its placeholder canvas's parent frame rate (Closed)
Patch Set: rebase again Created 3 years, 11 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 8fe5f43b2ca632383c73d3e0d4f0fe3ada8d68d4..cb197b7ad5a306566dac7445690e8f4cddfd4f5d 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
@@ -32,6 +32,7 @@ class PLATFORM_EXPORT OffscreenCanvasFrameDispatcherImpl final
// OffscreenCanvasFrameDispatcher implementation.
~OffscreenCanvasFrameDispatcherImpl() final;
+ void setNeedsBeginFrame(bool) final;
void dispatchFrame(RefPtr<StaticBitmapImage>,
double commitStartTime,
bool isWebGLSoftwareRendering = false) final;
@@ -56,15 +57,13 @@ class PLATFORM_EXPORT OffscreenCanvasFrameDispatcherImpl final
private:
// Surface-related
cc::SurfaceIdAllocator m_surfaceIdAllocator;
- void scheduleSyntheticBeginFrame(); // To be removed (crbug.com/674744)
-
- TaskHandle m_syntheticBeginFrameTask; // To be removed (crbug.com/674744)
const cc::FrameSinkId m_frameSinkId;
cc::LocalSurfaceId m_currentLocalSurfaceId;
int m_width;
int m_height;
bool m_changeSizeForNextCommit;
+ bool m_needsBeginFrame;
unsigned m_nextResourceId;
HashMap<unsigned, RefPtr<StaticBitmapImage>> m_cachedImages;
@@ -73,6 +72,7 @@ class PLATFORM_EXPORT OffscreenCanvasFrameDispatcherImpl final
HashSet<unsigned> m_spareResourceLocks;
bool verifyImageSize(const IntSize);
+ void postImageToPlaceholder(RefPtr<StaticBitmapImage>);
cc::mojom::blink::MojoCompositorFrameSinkPtr m_sink;
mojo::Binding<cc::mojom::blink::MojoCompositorFrameSinkClient> m_binding;

Powered by Google App Engine
This is Rietveld 408576698