Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)
Reason for revert:
Want to reland the original CL.
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, bensong@google.com
TBR=bensong@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/235523003
git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 52e7332..03556e7 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -268,7 +268,7 @@
static void force_all_opaque(const SkBitmap& bitmap) {
SkColorType colorType = bitmap.colorType();
switch (colorType) {
- case kPMColor_SkColorType:
+ case kN32_SkColorType:
force_all_opaque_8888(bitmap);
break;
case kRGB_565_SkColorType:
@@ -294,7 +294,7 @@
// from this method, we should be able to get rid of the
// transformation to 8888 format also.
SkBitmap copy;
- bitmap.copyTo(©, kPMColor_SkColorType);
+ bitmap.copyTo(©, kN32_SkColorType);
if (!SkImageEncoder::EncodeFile(path.c_str(), copy,
SkImageEncoder::kPNG_Type,
100)) {
@@ -740,8 +740,8 @@
return;
}
- if ((kPMColor_SkColorType != expectedBitmap.colorType()) ||
- (kPMColor_SkColorType != actualBitmap.colorType())) {
+ if ((kN32_SkColorType != expectedBitmap.colorType()) ||
+ (kN32_SkColorType != actualBitmap.colorType())) {
SkDebugf("---- %s: not computing max per-channel pixel mismatch because non-8888\n",
testName);
return;