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

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

Issue 2493673002: Synchronize OffscreenCanvas content with the placeholder canvas (Closed)
Patch Set: fix obsolete test Created 4 years, 1 month 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/OffscreenCanvasFrameDispatcher.h
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
index 7f993faaeea41624179bb33e4df571a036a03167..23de3e67261dcb92810bc360bbadd4d67c178f4a 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
@@ -7,6 +7,7 @@
#include "platform/PlatformExport.h"
#include "wtf/RefPtr.h"
+#include "wtf/WeakPtr.h"
namespace blink {
@@ -14,10 +15,19 @@ class StaticBitmapImage;
class PLATFORM_EXPORT OffscreenCanvasFrameDispatcher {
public:
- virtual ~OffscreenCanvasFrameDispatcher(){};
+ OffscreenCanvasFrameDispatcher() : m_weakPtrFactory(this) {}
+ virtual ~OffscreenCanvasFrameDispatcher() {}
virtual void dispatchFrame(RefPtr<StaticBitmapImage>,
double commitStartTime,
bool isWebGLSoftwareRendering = false) = 0;
+ virtual void reclaimResource(unsigned resourceId) = 0;
+
+ WeakPtr<OffscreenCanvasFrameDispatcher> createWeakPtr() {
+ return m_weakPtrFactory.createWeakPtr();
+ }
+
+ private:
+ WeakPtrFactory<OffscreenCanvasFrameDispatcher> m_weakPtrFactory;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698