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

Unified Diff: skia/include/SkMask.h

Issue 93093: Implement canvas's globalCompositeOperation lighter properly.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « skia/effects/SkLayerRasterizer.cpp ('k') | skia/include/SkPorterDuff.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/include/SkMask.h
===================================================================
--- skia/include/SkMask.h (revision 14480)
+++ skia/include/SkMask.h (working copy)
@@ -40,12 +40,18 @@
uint16_t fRowBytes;
uint8_t fFormat; // Format
+ /** Returns true if the mask is empty: i.e. it has an empty bounds.
+ */
+ bool isEmpty() const { return fBounds.isEmpty(); }
+
/** Return the byte size of the mask, assuming only 1 plane.
- Does not account for k3D_Format. For that, use computeFormatImageSize()
+ Does not account for k3D_Format. For that, use computeTotalImageSize()
+ If there is an overflow of 32bits, then returns 0.
*/
size_t computeImageSize() const;
/** Return the byte size of the mask, taking into account
any extra planes (e.g. k3D_Format).
+ If there is an overflow of 32bits, then returns 0.
*/
size_t computeTotalImageSize() const;
« no previous file with comments | « skia/effects/SkLayerRasterizer.cpp ('k') | skia/include/SkPorterDuff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698