summaryrefslogtreecommitdiffstats
path: root/dom/canvas/CanvasRenderingContext2D.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-02-14 11:46:21 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-02-14 11:46:21 +0100
commit91799767e1c575dce6cdb1528f1f10a1fd62e35f (patch)
tree48d925ea0d3123ef18d8a810724b3cdf7ad3b734 /dom/canvas/CanvasRenderingContext2D.h
parent0e80d10f4a10496a6657df210ff45a89fba68a75 (diff)
downloadUXP-91799767e1c575dce6cdb1528f1f10a1fd62e35f.tar
UXP-91799767e1c575dce6cdb1528f1f10a1fd62e35f.tar.gz
UXP-91799767e1c575dce6cdb1528f1f10a1fd62e35f.tar.lz
UXP-91799767e1c575dce6cdb1528f1f10a1fd62e35f.tar.xz
UXP-91799767e1c575dce6cdb1528f1f10a1fd62e35f.zip
Implement origin-clean algorithm for ImageBitmap.
This resolves #973.
Diffstat (limited to 'dom/canvas/CanvasRenderingContext2D.h')
-rw-r--r--dom/canvas/CanvasRenderingContext2D.h14
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