| Index: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
|
| diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
|
| index cb61c23899c6c8d6c2516a75d80e9c477f1ccc3c..8454a3ce29ad72a378999f67d2406b79fbacef1e 100644
|
| --- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
|
| +++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
|
| @@ -32,6 +32,7 @@
|
| #include "core/layout/HitTestCanvasResult.h"
|
| #include "core/offscreencanvas/OffscreenCanvas.h"
|
| #include "platform/graphics/ColorBehavior.h"
|
| +#include "public/platform/WebThread.h"
|
| #include "third_party/skia/include/core/SkColorSpace.h"
|
| #include "third_party/skia/include/core/SkImageInfo.h"
|
| #include "wtf/HashSet.h"
|
| @@ -56,7 +57,8 @@ enum CanvasColorSpace {
|
|
|
| class CORE_EXPORT CanvasRenderingContext
|
| : public GarbageCollectedFinalized<CanvasRenderingContext>,
|
| - public ScriptWrappable {
|
| + public ScriptWrappable,
|
| + public WebThread::TaskObserver {
|
| WTF_MAKE_NONCOPYABLE(CanvasRenderingContext);
|
| USING_PRE_FINALIZER(CanvasRenderingContext, dispose);
|
|
|
| @@ -103,6 +105,7 @@ class CORE_EXPORT CanvasRenderingContext
|
| NOTREACHED();
|
| }
|
| virtual bool isPaintable() const = 0;
|
| + virtual void didDraw(const SkIRect& dirtyRect);
|
|
|
| // Return true if the content is updated.
|
| virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) {
|
| @@ -125,6 +128,10 @@ class CORE_EXPORT CanvasRenderingContext
|
| };
|
| virtual void loseContext(LostContextMode) {}
|
|
|
| + // WebThread::TaskObserver implementation
|
| + void didProcessTask() override;
|
| + void willProcessTask() final {}
|
| +
|
| // Canvas2D-specific interface
|
| virtual bool is2d() const { return false; }
|
| virtual void restoreCanvasMatrixClipStack(SkCanvas*) const {}
|
| @@ -193,6 +200,7 @@ class CORE_EXPORT CanvasRenderingContext
|
| HashSet<String> m_dirtyURLs;
|
| CanvasColorSpace m_colorSpace;
|
| CanvasContextCreationAttributes m_creationAttributes;
|
| + bool m_finalizeFrameScheduled = false;
|
| };
|
|
|
| } // namespace blink
|
|
|