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

Unified Diff: include/core/SkBitmap.h

Issue 1157303008: Revert of move erase into SkPixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | include/core/SkPixmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index b13b6f74515cbb29f4ecec22fd48aa9270c7009c..c070203d04f4bfe9d5e087498bf5427f71e62abb 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -473,7 +473,10 @@
* 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 @@
* 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 @@
* 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,8 +736,12 @@
};
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
*/
« no previous file with comments | « no previous file | include/core/SkPixmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698