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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Issue 2653933003: Make stream captures work on canvases that are not in the DOM. (Closed)
Patch Set: rebase Created 3 years, 10 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/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 406457ddcac348e06bfbcbbc9bb849fe067e16c0..b420788e72f6fa6d018efc27dcac81a464d22691 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);
@@ -109,6 +111,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) {
@@ -131,6 +134,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(PaintCanvas*) const {}
@@ -199,6 +206,7 @@ class CORE_EXPORT CanvasRenderingContext
HashSet<String> m_dirtyURLs;
CanvasColorSpace m_colorSpace;
CanvasContextCreationAttributes m_creationAttributes;
+ bool m_finalizeFrameScheduled = false;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698