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
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/234243002
git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 050fc4a..c8fbf3d 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -958,7 +958,7 @@
fSlideMenu = new SkOSMenu;
this->addMenu(fSlideMenu);
- this->setColorType(kN32_SkColorType);
+ this->setColorType(kPMColor_SkColorType);
this->setVisibleP(true);
this->setClipToBounds(false);
@@ -1449,7 +1449,7 @@
SkBaseDevice* device = orig->getDevice();
SkBitmap bmp;
- if (device->accessBitmap(false).copyTo(&bmp, kN32_SkColorType)) {
+ if (device->accessBitmap(false).copyTo(&bmp, kPMColor_SkColorType)) {
static int gSampleGrabCounter;
SkString name;
name.printf("sample_grab_%d.png", gSampleGrabCounter++);
@@ -1552,7 +1552,7 @@
kUnknown_SkColorType, // none -> none
kUnknown_SkColorType, // a8 -> none
kARGB_4444_SkColorType, // 565 -> 4444
- kN32_SkColorType, // 4444 -> 8888
+ kPMColor_SkColorType, // 4444 -> 8888
kRGB_565_SkColorType, // 8888 -> 565
kRGB_565_SkColorType, // 8888 -> 565
kUnknown_SkColorType, // index8 -> none
diff --git a/samplecode/SampleDitherBitmap.cpp b/samplecode/SampleDitherBitmap.cpp
index e05d074..a3ebafa 100644
--- a/samplecode/SampleDitherBitmap.cpp
+++ b/samplecode/SampleDitherBitmap.cpp
@@ -84,7 +84,7 @@
DitherBitmapView() {
fResult = test_pathregion();
fBM8 = make_bitmap();
- fBM8.copyTo(&fBM32, kN32_SkColorType);
+ fBM8.copyTo(&fBM32, kPMColor_SkColorType);
this->setBGColor(0xFFDDDDDD);
}
diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp
index 080c05f..4769fbb 100644
--- a/samplecode/SampleEncode.cpp
+++ b/samplecode/SampleEncode.cpp
@@ -43,7 +43,7 @@
SkIntToScalar(width)/2, paint);
switch (ct) {
- case kN32_SkColorType:
+ case kPMColor_SkColorType:
bm->swap(device);
break;
case kRGB_565_SkColorType: {
@@ -81,7 +81,7 @@
// configs to build the original bitmap in. Can be at most these 3
static const SkColorType gColorTypes[] = {
- kN32_SkColorType,
+ kPMColor_SkColorType,
kRGB_565_SkColorType,
kIndex_8_SkColorType, // opaque
kIndex_8_SkColorType // alpha
diff --git a/samplecode/SampleFilter.cpp b/samplecode/SampleFilter.cpp
index e17a33c..7b2c551 100644
--- a/samplecode/SampleFilter.cpp
+++ b/samplecode/SampleFilter.cpp
@@ -91,7 +91,7 @@
make_bm(&fBM8);
fBM8.copyTo(&fBM4444, kARGB_4444_SkColorType);
fBM8.copyTo(&fBM16, kRGB_565_SkColorType);
- fBM8.copyTo(&fBM32, kN32_SkColorType);
+ fBM8.copyTo(&fBM32, kPMColor_SkColorType);
this->setBGColor(0xFFDDDDDD);
}
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 8d58b9b..28671d6 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -116,7 +116,7 @@
case kAlpha_8_SkColorType:
case kRGB_565_SkColorType:
return true;
- case kN32_SkColorType:
+ case kPMColor_SkColorType:
return kPremul_SkAlphaType == info.alphaType() ||
kOpaque_SkAlphaType == info.alphaType();
default:
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp
index 9ffcceb..735b990 100644
--- a/samplecode/SampleTiling.cpp
+++ b/samplecode/SampleTiling.cpp
@@ -55,7 +55,7 @@
}
static const SkColorType gColorTypes[] = {
- kN32_SkColorType,
+ kPMColor_SkColorType,
kRGB_565_SkColorType,
};
static const int gWidth = 32;