diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-14 11:46:21 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-23 02:12:38 +0100 |
commit | 6478daf2988b56ae73f941fd471242b7e92b2a4e (patch) | |
tree | a572c976e75590a8e5a6748ae40a56f7efdcf89d /dom/canvas/CanvasRenderingContext2D.h | |
parent | 181cb5210e6555102f5215316ea7a9b1771b0717 (diff) | |
download | UXP-6478daf2988b56ae73f941fd471242b7e92b2a4e.tar UXP-6478daf2988b56ae73f941fd471242b7e92b2a4e.tar.gz UXP-6478daf2988b56ae73f941fd471242b7e92b2a4e.tar.lz UXP-6478daf2988b56ae73f941fd471242b7e92b2a4e.tar.xz UXP-6478daf2988b56ae73f941fd471242b7e92b2a4e.zip |
Implement origin-clean algorithm for ImageBitmap.
This resolves #973.
Diffstat (limited to 'dom/canvas/CanvasRenderingContext2D.h')
-rw-r--r-- | dom/canvas/CanvasRenderingContext2D.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/canvas/CanvasRenderingContext2D.h b/dom/canvas/CanvasRenderingContext2D.h index 848b3ee08..46758ec88 100644 --- a/dom/canvas/CanvasRenderingContext2D.h +++ b/dom/canvas/CanvasRenderingContext2D.h @@ -40,6 +40,7 @@ class SourceSurface; namespace dom { class HTMLImageElementOrSVGImageElementOrHTMLCanvasElementOrHTMLVideoElementOrImageBitmap; typedef HTMLImageElementOrSVGImageElementOrHTMLCanvasElementOrHTMLVideoElementOrImageBitmap CanvasImageSource; +class ImageBitmap; class ImageData; class StringOrCanvasGradientOrCanvasPattern; class OwningStringOrCanvasGradientOrCanvasPattern; @@ -1151,6 +1152,19 @@ protected: friend struct CanvasBidiProcessor; friend class CanvasDrawObserver; + friend class ImageBitmap; + + // For the origin-clean algorithm (mWriteOnly == !origin-clean) + // See https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html + void SetWriteOnly() { + mWriteOnly = true; + } + + bool IsWriteOnly() const { + return mWriteOnly; + } + + bool mWriteOnly; }; } // namespace dom |