diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-10 22:36:34 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-10 22:36:34 +0000 |
commit | 757ebd20ef284b6428eb9f4b9b69826cc3640a82 (patch) | |
tree | f1cbb4b5a361fee8c24f685c01953dc06cee4ed6 /tests | |
parent | 4770a3b7a290ee5e44662b8dfbc0bc9196f00930 (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/BitmapCopyTest.cpp | 4 | ||||
-rw-r--r-- | tests/BitmapGetColorTest.cpp | 6 | ||||
-rw-r--r-- | tests/BitmapTest.cpp | 2 | ||||
-rw-r--r-- | tests/BlitRowTest.cpp | 6 | ||||
-rw-r--r-- | tests/CachedDecodingPixelRefTest.cpp | 4 | ||||
-rw-r--r-- | tests/CanvasStateTest.cpp | 2 | ||||
-rw-r--r-- | tests/DrawBitmapRectTest.cpp | 2 | ||||
-rw-r--r-- | tests/ImageDecodingTest.cpp | 4 | ||||
-rw-r--r-- | tests/ReadPixelsTest.cpp | 2 | ||||
-rw-r--r-- | tests/SerializationTest.cpp | 2 | ||||
-rw-r--r-- | tests/SurfaceTest.cpp | 2 | ||||
-rw-r--r-- | tests/WritePixelsTest.cpp | 2 |
12 files changed, 19 insertions, 19 deletions
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp index 74f4ac9d34..f734ad8356 100644 --- a/tests/BitmapCopyTest.cpp +++ b/tests/BitmapCopyTest.cpp @@ -188,7 +188,7 @@ static const Pair gPairs[] = { { kIndex_8_SkColorType, "011101" }, { kRGB_565_SkColorType, "010101" }, { kARGB_4444_SkColorType, "010111" }, - { kN32_SkColorType, "010111" }, + { kPMColor_SkColorType, "010111" }, }; static const int W = 20; @@ -364,7 +364,7 @@ DEF_TEST(BitmapCopy, reporter) { } break; - case kN32_SkColorType: + case kPMColor_SkColorType: if (safeSize != 0x8E1BC9BF040000LL) { sizeFail = true; } diff --git a/tests/BitmapGetColorTest.cpp b/tests/BitmapGetColorTest.cpp index bf6ebcb5cf..28f3cb309d 100644 --- a/tests/BitmapGetColorTest.cpp +++ b/tests/BitmapGetColorTest.cpp @@ -22,9 +22,9 @@ DEF_TEST(GetColor, reporter) { { kAlpha_8_SkColorType, 0, 0 }, { kRGB_565_SkColorType, 0xFF00FF00, 0xFF00FF00 }, { kRGB_565_SkColorType, 0xFFFF00FF, 0xFFFF00FF }, - { kN32_SkColorType, 0xFFFFFFFF, 0xFFFFFFFF }, - { kN32_SkColorType, 0, 0 }, - { kN32_SkColorType, 0xFF224466, 0xFF224466 }, + { kPMColor_SkColorType, 0xFFFFFFFF, 0xFFFFFFFF }, + { kPMColor_SkColorType, 0, 0 }, + { kPMColor_SkColorType, 0xFF224466, 0xFF224466 }, }; // specify an area that doesn't touch (0,0) and may extend beyond the diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp index dce1069542..0167d52d02 100644 --- a/tests/BitmapTest.cpp +++ b/tests/BitmapTest.cpp @@ -25,7 +25,7 @@ static void test_bigwidth(skiatest::Reporter* reporter) { // TODO: perhaps skia can relax this, and only require that rowBytes fit // in a uint32_t (or larger), but for now this is the constraint. - info.fColorType = kN32_SkColorType; + info.fColorType = kPMColor_SkColorType; REPORTER_ASSERT(reporter, !bm.setConfig(info)); } diff --git a/tests/BlitRowTest.cpp b/tests/BlitRowTest.cpp index 911f2a0f40..b8ac0c06c7 100644 --- a/tests/BlitRowTest.cpp +++ b/tests/BlitRowTest.cpp @@ -63,7 +63,7 @@ static int proc_bad(const void*, int, uint32_t, uint32_t* bad) { static Proc find_proc(const SkBitmap& bm, SkPMColor expect32, uint16_t expect16, uint8_t expect8, uint32_t* expect) { switch (bm.colorType()) { - case kN32_SkColorType: + case kPMColor_SkColorType: *expect = expect32; return proc_32; case kARGB_4444_SkColorType: @@ -101,7 +101,7 @@ static void test_00_FF(skiatest::Reporter* reporter) { static const int W = 256; static const SkColorType gDstColorType[] = { - kN32_SkColorType, + kPMColor_SkColorType, kRGB_565_SkColorType, }; @@ -192,7 +192,7 @@ static void test_diagonal(skiatest::Reporter* reporter) { static const int H = W; static const SkColorType gDstColorType[] = { - kN32_SkColorType, + kPMColor_SkColorType, kRGB_565_SkColorType, }; diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp index 705f0666a4..b2ecb0f3ab 100644 --- a/tests/CachedDecodingPixelRefTest.cpp +++ b/tests/CachedDecodingPixelRefTest.cpp @@ -189,7 +189,7 @@ public: } info->fWidth = TestImageGenerator::Width(); info->fHeight = TestImageGenerator::Height(); - info->fColorType = kN32_SkColorType; + info->fColorType = kPMColor_SkColorType; info->fAlphaType = kOpaque_SkAlphaType; return true; } @@ -202,7 +202,7 @@ public: REPORTER_ASSERT(fReporter, rowBytes >= minRowBytes); if ((NULL == pixels) || (fType != kSucceedGetPixels_TestType) - || (info.fColorType != kN32_SkColorType)) { + || (info.fColorType != kPMColor_SkColorType)) { return false; } char* bytePtr = static_cast<char*>(pixels); diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp index 5c7e4738c2..212b14ab3e 100644 --- a/tests/CanvasStateTest.cpp +++ b/tests/CanvasStateTest.cpp @@ -26,7 +26,7 @@ static void test_complex_layers(skiatest::Reporter* reporter) { SkIntToScalar((HEIGHT-(2*SPACER)) / 7)); const SkColorType colorTypes[] = { - kRGB_565_SkColorType, kN32_SkColorType + kRGB_565_SkColorType, kPMColor_SkColorType }; const int configCount = sizeof(colorTypes) / sizeof(SkBitmap::Config); diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp index 9912643566..f778480bcb 100644 --- a/tests/DrawBitmapRectTest.cpp +++ b/tests/DrawBitmapRectTest.cpp @@ -25,7 +25,7 @@ public: virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE { info->fWidth = 100; info->fHeight = 100; - info->fColorType = kN32_SkColorType; + info->fColorType = kPMColor_SkColorType; info->fAlphaType = kPremul_SkAlphaType; return true; } diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp index 5d52f906b2..7b2f988ffc 100644 --- a/tests/ImageDecodingTest.cpp +++ b/tests/ImageDecodingTest.cpp @@ -395,7 +395,7 @@ static inline const char* SkColorType_to_string(SkColorType colorType) { case kAlpha_8_SkColorType: return "Alpha_8"; case kRGB_565_SkColorType: return "RGB_565"; case kARGB_4444_SkColorType: return "ARGB_4444"; - case kN32_SkColorType: return "N32"; + case kPMColor_SkColorType: return "PMColor"; case kBackwards_SkColorType: return "Backwards"; case kIndex_8_SkColorType: return "Index_8"; default: return "ERROR"; @@ -537,7 +537,7 @@ DEF_TEST(ImageDecoderOptions, reporter) { kAlpha_8_SkColorType, kRGB_565_SkColorType, kARGB_4444_SkColorType, // Most decoders will fail on 4444. - kN32_SkColorType + kPMColor_SkColorType // Note that indexed color is left out of the list. Lazy // decoding doesn't do indexed color. }; diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp index 804a7c4abe..0ed062e681 100644 --- a/tests/ReadPixelsTest.cpp +++ b/tests/ReadPixelsTest.cpp @@ -381,7 +381,7 @@ DEF_GPUTEST(ReadPixels, reporter, factory) { SkIRect clippedRect = DEV_RECT; if (clippedRect.intersect(srcRect)) { REPORTER_ASSERT(reporter, success); - REPORTER_ASSERT(reporter, kN32_SkColorType == wkbmp.colorType()); + REPORTER_ASSERT(reporter, kPMColor_SkColorType == wkbmp.colorType()); REPORTER_ASSERT(reporter, kPremul_SkAlphaType == wkbmp.alphaType()); checkRead(reporter, wkbmp, clippedRect.fLeft, clippedRect.fTop, true, false); diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp index a039e55d02..dfc7afa4fc 100644 --- a/tests/SerializationTest.cpp +++ b/tests/SerializationTest.cpp @@ -233,7 +233,7 @@ static void TestBitmapSerialization(const SkBitmap& validBitmap, static bool setup_bitmap_for_canvas(SkBitmap* bitmap) { SkImageInfo info = SkImageInfo::Make( - kBitmapSize, kBitmapSize, kN32_SkColorType, kPremul_SkAlphaType); + kBitmapSize, kBitmapSize, kPMColor_SkColorType, kPremul_SkAlphaType); return bitmap->allocPixels(info); } diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index a3efd971d8..705ea14989 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -151,7 +151,7 @@ static void test_imagepeek(skiatest::Reporter* reporter) { if (success) { REPORTER_ASSERT(reporter, 10 == info.fWidth); REPORTER_ASSERT(reporter, 10 == info.fHeight); - REPORTER_ASSERT(reporter, kN32_SkColorType == info.fColorType); + REPORTER_ASSERT(reporter, kPMColor_SkColorType == info.fColorType); REPORTER_ASSERT(reporter, kPremul_SkAlphaType == info.fAlphaType || kOpaque_SkAlphaType == info.fAlphaType); REPORTER_ASSERT(reporter, info.minRowBytes() <= rowBytes); diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp index a0e3051680..a1c978d1b1 100644 --- a/tests/WritePixelsTest.cpp +++ b/tests/WritePixelsTest.cpp @@ -213,7 +213,7 @@ static bool checkWrite(skiatest::Reporter* reporter, SkCanvas* canvas, const SkB if (canvasInfo.width() != DEV_W || canvasInfo.height() != DEV_H || - canvasInfo.colorType() != kN32_SkColorType) { + canvasInfo.colorType() != kPMColor_SkColorType) { return false; } |