diff options
author | 2015-06-08 10:03:49 -0700 | |
---|---|---|
committer | 2015-06-08 10:03:49 -0700 | |
commit | cca9b3ac908cf3e9a0c5774a5ffd118d8429e08a (patch) | |
tree | 6055adebba6bab0147a3944958338f82b4c20a63 /include/core/SkBitmap.h | |
parent | 0963f5dab079627c5523ce6a443af27a33e361f7 (diff) |
Revert of move erase into SkPixmap (patchset #1 id:1 of https://codereview.chromium.org/1161033005/)
Reason for revert:
broken builds
Original issue's description:
> move erase into SkPixmap
>
> harvested from https://codereview.chromium.org/1148793007
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/0963f5dab079627c5523ce6a443af27a33e361f7
TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1157303008
Diffstat (limited to 'include/core/SkBitmap.h')
-rw-r--r-- | include/core/SkBitmap.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index b13b6f7451..c070203d04 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -473,7 +473,10 @@ public: * of the color is ignored (treated as opaque). If the colortype only supports * alpha (e.g. A1 or A8) then the color's r,g,b components are ignored. */ - void eraseColor(SkColor c) const; + void eraseColor(SkColor c) const { + this->eraseARGB(SkColorGetA(c), SkColorGetR(c), SkColorGetG(c), + SkColorGetB(c)); + } /** * Fill the entire bitmap with the specified color. @@ -481,9 +484,7 @@ public: * of the color is ignored (treated as opaque). If the colortype only supports * alpha (e.g. A1 or A8) then the color's r,g,b components are ignored. */ - void eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) const { - this->eraseColor(SkColorSetARGB(a, r, g, b)); - } + void eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) const; SK_ATTR_DEPRECATED("use eraseARGB or eraseColor") void eraseRGB(U8CPU r, U8CPU g, U8CPU b) const { @@ -496,12 +497,7 @@ public: * of the color is ignored (treated as opaque). If the colortype only supports * alpha (e.g. A1 or A8) then the color's r,g,b components are ignored. */ - void erase(SkColor c, const SkIRect& area) const; - - // DEPRECATED - void eraseArea(const SkIRect& area, SkColor c) const { - this->erase(c, area); - } + void eraseArea(const SkIRect& area, SkColor c) const; /** * Return the SkColor of the specified pixel. In most cases this will @@ -740,9 +736,13 @@ private: }; SkImageInfo fInfo; + uint32_t fRowBytes; + uint8_t fFlags; + void internalErase(const SkIRect&, U8CPU a, U8CPU r, U8CPU g, U8CPU b)const; + /* Unreference any pixelrefs or colortables */ void freePixels(); |