diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-10 22:49:20 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-10 22:49:20 +0000 |
commit | d923288e50b5a69afb0bdd5c161191b24cab8345 (patch) | |
tree | 9a55b68adb2542c2548359e94ec787994483d5d1 /samplecode | |
parent | 757ebd20ef284b6428eb9f4b9b69826cc3640a82 (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 'samplecode')
-rw-r--r-- | samplecode/SampleApp.cpp | 6 | ||||
-rw-r--r-- | samplecode/SampleDitherBitmap.cpp | 2 | ||||
-rw-r--r-- | samplecode/SampleEncode.cpp | 4 | ||||
-rw-r--r-- | samplecode/SampleFilter.cpp | 2 | ||||
-rw-r--r-- | samplecode/SampleFilterFuzz.cpp | 2 | ||||
-rw-r--r-- | samplecode/SampleTiling.cpp | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index c8fbf3dd15..050fc4aa8c 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -958,7 +958,7 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev fSlideMenu = new SkOSMenu; this->addMenu(fSlideMenu); - this->setColorType(kPMColor_SkColorType); + this->setColorType(kN32_SkColorType); this->setVisibleP(true); this->setClipToBounds(false); @@ -1449,7 +1449,7 @@ void SampleWindow::afterChildren(SkCanvas* orig) { SkBaseDevice* device = orig->getDevice(); SkBitmap bmp; - if (device->accessBitmap(false).copyTo(&bmp, kPMColor_SkColorType)) { + if (device->accessBitmap(false).copyTo(&bmp, kN32_SkColorType)) { static int gSampleGrabCounter; SkString name; name.printf("sample_grab_%d.png", gSampleGrabCounter++); @@ -1552,7 +1552,7 @@ static SkColorType gColorTypeCycle[] = { kUnknown_SkColorType, // none -> none kUnknown_SkColorType, // a8 -> none kARGB_4444_SkColorType, // 565 -> 4444 - kPMColor_SkColorType, // 4444 -> 8888 + kN32_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 a3ebafa296..e05d074f3b 100644 --- a/samplecode/SampleDitherBitmap.cpp +++ b/samplecode/SampleDitherBitmap.cpp @@ -84,7 +84,7 @@ public: DitherBitmapView() { fResult = test_pathregion(); fBM8 = make_bitmap(); - fBM8.copyTo(&fBM32, kPMColor_SkColorType); + fBM8.copyTo(&fBM32, kN32_SkColorType); this->setBGColor(0xFFDDDDDD); } diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp index 4769fbb0a8..080c05f5d7 100644 --- a/samplecode/SampleEncode.cpp +++ b/samplecode/SampleEncode.cpp @@ -43,7 +43,7 @@ static void make_image(SkBitmap* bm, SkColorType ct, int configIndex) { SkIntToScalar(width)/2, paint); switch (ct) { - case kPMColor_SkColorType: + case kN32_SkColorType: bm->swap(device); break; case kRGB_565_SkColorType: { @@ -81,7 +81,7 @@ static void make_image(SkBitmap* bm, SkColorType ct, int configIndex) { // configs to build the original bitmap in. Can be at most these 3 static const SkColorType gColorTypes[] = { - kPMColor_SkColorType, + kN32_SkColorType, kRGB_565_SkColorType, kIndex_8_SkColorType, // opaque kIndex_8_SkColorType // alpha diff --git a/samplecode/SampleFilter.cpp b/samplecode/SampleFilter.cpp index 7b2c5516a2..e17a33c3d4 100644 --- a/samplecode/SampleFilter.cpp +++ b/samplecode/SampleFilter.cpp @@ -91,7 +91,7 @@ public: make_bm(&fBM8); fBM8.copyTo(&fBM4444, kARGB_4444_SkColorType); fBM8.copyTo(&fBM16, kRGB_565_SkColorType); - fBM8.copyTo(&fBM32, kPMColor_SkColorType); + fBM8.copyTo(&fBM32, kN32_SkColorType); this->setBGColor(0xFFDDDDDD); } diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp index 28671d6b99..8d58b9b8de 100644 --- a/samplecode/SampleFilterFuzz.cpp +++ b/samplecode/SampleFilterFuzz.cpp @@ -116,7 +116,7 @@ static bool valid_for_raster_canvas(const SkImageInfo& info) { case kAlpha_8_SkColorType: case kRGB_565_SkColorType: return true; - case kPMColor_SkColorType: + case kN32_SkColorType: return kPremul_SkAlphaType == info.alphaType() || kOpaque_SkAlphaType == info.alphaType(); default: diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp index 735b9907ef..9ffccebf1a 100644 --- a/samplecode/SampleTiling.cpp +++ b/samplecode/SampleTiling.cpp @@ -55,7 +55,7 @@ static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, } static const SkColorType gColorTypes[] = { - kPMColor_SkColorType, + kN32_SkColorType, kRGB_565_SkColorType, }; static const int gWidth = 32; |