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

Unified Diff: src/core/SkBlitter.cpp

Issue 173893002: use colortype instead of config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « src/core/SkBitmap_scroll.cpp ('k') | src/core/SkBlitter_Sprite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter.cpp
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 31a3edea769a3f68de7e4978a2e8d36bfb870c49..98325c024501aad838387952cfffdf6fcac98d58 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -812,7 +812,7 @@ enum XferInterp {
};
static XferInterp interpret_xfermode(const SkPaint& paint, SkXfermode* xfer,
- SkBitmap::Config deviceConfig) {
+ SkColorType deviceCT) {
SkXfermode::Mode mode;
if (SkXfermode::AsMode(xfer, &mode)) {
@@ -827,12 +827,12 @@ static XferInterp interpret_xfermode(const SkPaint& paint, SkXfermode* xfer,
case SkXfermode::kSrcOver_Mode:
return kSrcOver_XferInterp;
case SkXfermode::kDstOver_Mode:
- if (SkBitmap::kRGB_565_Config == deviceConfig) {
+ if (kRGB_565_SkColorType == deviceCT) {
return kSkipDrawing_XferInterp;
}
break;
case SkXfermode::kSrcIn_Mode:
- if (SkBitmap::kRGB_565_Config == deviceConfig &&
+ if (kRGB_565_SkColorType == deviceCT &&
just_solid_color(paint)) {
return kSrcOver_XferInterp;
}
@@ -860,8 +860,8 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
// which check, in case we're being called by a client with a dummy device
// (e.g. they have a bounder that always aborts the draw)
- if (SkBitmap::kNo_Config == device.config() ||
- (drawCoverage && (SkBitmap::kA8_Config != device.config()))) {
+ if (kUnknown_SkColorType == device.colorType() ||
+ (drawCoverage && (kAlpha_8_SkColorType != device.colorType()))) {
SK_PLACEMENT_NEW(blitter, SkNullBlitter, storage, storageSize);
return blitter;
}
@@ -882,7 +882,7 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
}
if (NULL != mode) {
- switch (interpret_xfermode(*paint, mode, device.config())) {
+ switch (interpret_xfermode(*paint, mode, device.colorType())) {
case kSrcOver_XferInterp:
mode = NULL;
paint.writable()->setXfermode(NULL);
@@ -945,8 +945,8 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
}
- switch (device.config()) {
- case SkBitmap::kA8_Config:
+ switch (device.colorType()) {
+ case kAlpha_8_SkColorType:
if (drawCoverage) {
SkASSERT(NULL == shader);
SkASSERT(NULL == paint->getXfermode());
@@ -961,11 +961,11 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
}
break;
- case SkBitmap::kRGB_565_Config:
+ case kRGB_565_SkColorType:
blitter = SkBlitter_ChooseD565(device, *paint, storage, storageSize);
break;
- case SkBitmap::kARGB_8888_Config:
+ case kPMColor_SkColorType:
if (shader) {
SK_PLACEMENT_NEW_ARGS(blitter, SkARGB32_Shader_Blitter,
storage, storageSize, (device, *paint));
« no previous file with comments | « src/core/SkBitmap_scroll.cpp ('k') | src/core/SkBlitter_Sprite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698