diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 12:50:58 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 12:50:58 +0000 |
commit | 9a136cdf89222c11b0dae86e19ff0b14956f929a (patch) | |
tree | 44f007a586303dce4a7a7024fd785eee22da61fe /skia/include | |
parent | e91a73a43d79d437c59a5a44396e919628f3f707 (diff) | |
download | chromium_src-9a136cdf89222c11b0dae86e19ff0b14956f929a.zip chromium_src-9a136cdf89222c11b0dae86e19ff0b14956f929a.tar.gz chromium_src-9a136cdf89222c11b0dae86e19ff0b14956f929a.tar.bz2 |
Integrate change of Skia upstream.
This is a cherry-pick of the following change:
http://code.google.com/p/skia/source/detail?r=159
We introduce this change for the 'lighter' composite operation. We need kAdd_Mode, which is introduced in this change for the operation.
Patch by Shinichiro Hamaji.
BUG=1619
Review URL: http://codereview.chromium.org/93093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/include')
-rw-r--r-- | skia/include/SkMask.h | 8 | ||||
-rw-r--r-- | skia/include/SkPorterDuff.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/skia/include/SkMask.h b/skia/include/SkMask.h index 764ead6..77f1f36 100644 --- a/skia/include/SkMask.h +++ b/skia/include/SkMask.h @@ -40,12 +40,18 @@ struct SkMask { 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; diff --git a/skia/include/SkPorterDuff.h b/skia/include/SkPorterDuff.h index f03e9cb..44c5477 100644 --- a/skia/include/SkPorterDuff.h +++ b/skia/include/SkPorterDuff.h @@ -48,6 +48,7 @@ public: kLighten_Mode, //!< [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + max(Sc, Dc)] kMultiply_Mode, //!< [Sa * Da, Sc * Dc] kScreen_Mode, //!< [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc] + kAdd_Mode, //!< Saturate(S + D) kModeCount }; |