Index: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h |
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h |
index 60f7005f4ef093f5637a58d7b8a58c0f66b2cdde..d5b7885e19d36d59872d6142959e24e2470f19e0 100644 |
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h |
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h |
@@ -6,6 +6,7 @@ |
#define OffscreenCanvasFrameDispatcher_h |
#include "platform/PlatformExport.h" |
+#include "platform/WebTaskRunner.h" |
#include "wtf/RefPtr.h" |
#include "wtf/WeakPtr.h" |
@@ -13,13 +14,17 @@ namespace blink { |
class StaticBitmapImage; |
+class OffscreenCanvasFrameDispatcherClient { |
+ public: |
+ virtual void beginFrame() = 0; |
+}; |
+ |
class PLATFORM_EXPORT OffscreenCanvasFrameDispatcher { |
public: |
- OffscreenCanvasFrameDispatcher() : m_weakPtrFactory(this) {} |
virtual ~OffscreenCanvasFrameDispatcher() {} |
virtual void dispatchFrame(RefPtr<StaticBitmapImage>, |
double commitStartTime, |
- bool isWebGLSoftwareRendering = false) = 0; |
+ bool isWebGLSoftwareRendering) = 0; |
virtual void reclaimResource(unsigned resourceId) = 0; |
virtual void reshape(int width, int height) = 0; |
@@ -28,8 +33,15 @@ class PLATFORM_EXPORT OffscreenCanvasFrameDispatcher { |
return m_weakPtrFactory.createWeakPtr(); |
} |
+ OffscreenCanvasFrameDispatcherClient* client() { return m_client; } |
+ |
+ protected: |
+ OffscreenCanvasFrameDispatcher(OffscreenCanvasFrameDispatcherClient* client) |
+ : m_weakPtrFactory(this), m_client(client) {} |
+ |
private: |
WeakPtrFactory<OffscreenCanvasFrameDispatcher> m_weakPtrFactory; |
+ OffscreenCanvasFrameDispatcherClient* m_client; |
}; |
} // namespace blink |