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

Unified Diff: Source/core/page/ImageBitmap.h

Issue 19705006: Use SkImage as a backing store for copying 2d Contexts to ImageBitmaps. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 4 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: Source/core/page/ImageBitmap.h
diff --git a/Source/core/page/ImageBitmap.h b/Source/core/page/ImageBitmap.h
index 5b91a5f618ae9eb6b5f4909720696cc2e243e19e..585728334b8a3dca16bfbd48e32350538258add3 100644
--- a/Source/core/page/ImageBitmap.h
+++ b/Source/core/page/ImageBitmap.h
@@ -33,6 +33,7 @@ public:
IntRect bitmapRect() const { return m_bitmapRect; }
IntPoint bitmapOffset() const { return m_bitmapOffset; }
+ bool derivedFromCanvas() const { return m_derivedFromCanvas; }
int width() const { return m_cropRect.width(); }
int height() const { return m_cropRect.height(); }
@@ -61,10 +62,11 @@ private:
IntRect m_cropRect;
// The offset by which the desired Image is stored internally.
- // ImageBitmaps constructed from HTMLImageElements reference the entire CachedImage and may have a non-zero bitmap offset.
- // ImageBitmaps not constructed from HTMLImageElements always pre-crop and store the image at (0, 0).
+ // ImageBitmaps constructed from image elements or canvases reference the entire CachedImage and may have a non-zero bitmap offset.
+ // Otherwise, ImageBitmaps pre-crop and store the image at (0, 0).
IntPoint m_bitmapOffset;
+ unsigned m_derivedFromCanvas : 1;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698