summaryrefslogtreecommitdiffstats
path: root/dom/canvas/ImageBitmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/ImageBitmap.h')
-rw-r--r--dom/canvas/ImageBitmap.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/canvas/ImageBitmap.h b/dom/canvas/ImageBitmap.h
index 1612296..8b4bd12 100644
--- a/dom/canvas/ImageBitmap.h
+++ b/dom/canvas/ImageBitmap.h
@@ -63,6 +63,7 @@ struct ImageBitmapCloneData final {
gfx::IntRect mPictureRect;
gfxAlphaType mAlphaType;
bool mIsCroppingAreaOutSideOfSourceImage;
+ bool mWriteOnly;
};
/*
@@ -160,6 +161,11 @@ class ImageBitmap final : public nsISupports, public nsWrapperCache {
void OnShutdown();
+ bool IsWriteOnly() const
+ {
+ return mWriteOnly;
+ }
+
protected:
/*
* The default value of aIsPremultipliedAlpha is TRUE because that the
@@ -181,6 +187,7 @@ class ImageBitmap final : public nsISupports, public nsWrapperCache {
* CreateInternal(from ImageData) method.
*/
ImageBitmap(nsIGlobalObject* aGlobal, layers::Image* aData,
+ bool aWriteOnly,
gfxAlphaType aAlphaType = gfxAlphaType::Premult);
virtual ~ImageBitmap();
@@ -271,6 +278,13 @@ class ImageBitmap final : public nsISupports, public nsWrapperCache {
* Whether this object allocated allocated and owns the image data.
*/
bool mAllocatedImageData;
+
+ /*
+ * Write-Only flag is set to true if this image has been generated from a
+ * cross-origin source. This is the opposite of what is called 'origin-clean'
+ * in the spec.
+ */
+ bool mWriteOnly;
};
} // namespace dom