aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-10 22:49:20 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-10 22:49:20 +0000
commitd923288e50b5a69afb0bdd5c161191b24cab8345 (patch)
tree9a55b68adb2542c2548359e94ec787994483d5d1 /src/utils
parent757ebd20ef284b6428eb9f4b9b69826cc3640a82 (diff)
Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)
Reason for revert: fixes on the chrome side are landing (brettw), keep fingers crossed. Original issue's description: > Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/) > > Reason for revert: > breaking the Chrome deps roll. > http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio > > Original issue's description: > > Rename kPMColor_SkColorType to kN32_SkColorType. > > > > The new name better represents what this flag means. > > > > BUG=skia:2384 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14117 > > TBR=reed@google.com,scroggo@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14144 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/233813004 git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkBitmapHasher.cpp2
-rw-r--r--src/utils/SkCanvasStateUtils.cpp4
-rw-r--r--src/utils/mac/SkCreateCGImageRef.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/utils/SkBitmapHasher.cpp b/src/utils/SkBitmapHasher.cpp
index 6c861cd04b..bd038ddaa0 100644
--- a/src/utils/SkBitmapHasher.cpp
+++ b/src/utils/SkBitmapHasher.cpp
@@ -57,7 +57,7 @@ static inline uint64_t first_8_bytes_as_uint64(const uint8_t *bytearray) {
// Hmm, that didn't work. Maybe if we create a new
// kARGB_8888_Config version of the bitmap it will work better?
SkBitmap copyBitmap;
- if (!bitmap.copyTo(&copyBitmap, kPMColor_SkColorType)) {
+ if (!bitmap.copyTo(&copyBitmap, kN32_SkColorType)) {
return false;
}
return ComputeDigestInternal(copyBitmap, result);
diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp
index c5b558a1fb..64f62dd8b1 100644
--- a/src/utils/SkCanvasStateUtils.cpp
+++ b/src/utils/SkCanvasStateUtils.cpp
@@ -223,7 +223,7 @@ SkCanvasState* SkCanvasStateUtils::CaptureCanvasState(SkCanvas* canvas) {
layerState->height = bitmap.height();
switch (bitmap.colorType()) {
- case kPMColor_SkColorType:
+ case kN32_SkColorType:
layerState->raster.config = kARGB_8888_RasterConfig;
break;
case kRGB_565_SkColorType:
@@ -281,7 +281,7 @@ static SkCanvas* create_canvas_from_canvas_layer(const SkCanvasLayerState& layer
SkBitmap bitmap;
SkColorType colorType =
- layerState.raster.config == kARGB_8888_RasterConfig ? kPMColor_SkColorType :
+ layerState.raster.config == kARGB_8888_RasterConfig ? kN32_SkColorType :
layerState.raster.config == kRGB_565_RasterConfig ? kRGB_565_SkColorType :
kUnknown_SkColorType;
diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp
index 7687c3c7e4..00166e9ed7 100644
--- a/src/utils/mac/SkCreateCGImageRef.cpp
+++ b/src/utils/mac/SkCreateCGImageRef.cpp
@@ -34,7 +34,7 @@ static bool getBitmapInfo(const SkBitmap& bm,
*upscaleTo32 = true;
}
// fall through
- case kPMColor_SkColorType:
+ case kN32_SkColorType:
*bitsPerComponent = 8;
#if SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
*info = kCGBitmapByteOrder32Big;
@@ -94,7 +94,7 @@ static SkBitmap* prepareForImageRef(const SkBitmap& bm,
copy = new SkBitmap;
// here we make a ceep copy of the pixels, since CG won't take our
// 565 directly
- bm.copyTo(copy, kPMColor_SkColorType);
+ bm.copyTo(copy, kN32_SkColorType);
} else {
copy = new SkBitmap(bm);
}