aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-09 20:45:29 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-09 20:45:29 +0000
commit149e9a107c356b0151433fb23c2b1c8d0634947c (patch)
tree7db3bbc9bba71665f1d0c2720c98682afcda2bda /tests
parent2a6f221bf8cea98bd7b44b02ce5c13a6b334a70d (diff)
Rename kPMColor_SkColorType to kN32_SkColorType.
The new name better represents what this flag means. BUG=skia:2384 R=reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/227433009 git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/BitmapCopyTest.cpp4
-rw-r--r--tests/BitmapGetColorTest.cpp6
-rw-r--r--tests/BitmapTest.cpp2
-rw-r--r--tests/BlitRowTest.cpp6
-rw-r--r--tests/CachedDecodingPixelRefTest.cpp4
-rw-r--r--tests/CanvasStateTest.cpp2
-rw-r--r--tests/DrawBitmapRectTest.cpp2
-rw-r--r--tests/ImageDecodingTest.cpp4
-rw-r--r--tests/ReadPixelsTest.cpp2
-rw-r--r--tests/SerializationTest.cpp2
-rw-r--r--tests/SurfaceTest.cpp2
-rw-r--r--tests/WritePixelsTest.cpp2
12 files changed, 19 insertions, 19 deletions
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index f734ad8356..74f4ac9d34 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" },
- { kPMColor_SkColorType, "010111" },
+ { kN32_SkColorType, "010111" },
};
static const int W = 20;
@@ -364,7 +364,7 @@ DEF_TEST(BitmapCopy, reporter) {
}
break;
- case kPMColor_SkColorType:
+ case kN32_SkColorType:
if (safeSize != 0x8E1BC9BF040000LL) {
sizeFail = true;
}
diff --git a/tests/BitmapGetColorTest.cpp b/tests/BitmapGetColorTest.cpp
index 28f3cb309d..bf6ebcb5cf 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 },
- { kPMColor_SkColorType, 0xFFFFFFFF, 0xFFFFFFFF },
- { kPMColor_SkColorType, 0, 0 },
- { kPMColor_SkColorType, 0xFF224466, 0xFF224466 },
+ { kN32_SkColorType, 0xFFFFFFFF, 0xFFFFFFFF },
+ { kN32_SkColorType, 0, 0 },
+ { kN32_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 0167d52d02..dce1069542 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 = kPMColor_SkColorType;
+ info.fColorType = kN32_SkColorType;
REPORTER_ASSERT(reporter, !bm.setConfig(info));
}
diff --git a/tests/BlitRowTest.cpp b/tests/BlitRowTest.cpp
index b8ac0c06c7..911f2a0f40 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 kPMColor_SkColorType:
+ case kN32_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[] = {
- kPMColor_SkColorType,
+ kN32_SkColorType,
kRGB_565_SkColorType,
};
@@ -192,7 +192,7 @@ static void test_diagonal(skiatest::Reporter* reporter) {
static const int H = W;
static const SkColorType gDstColorType[] = {
- kPMColor_SkColorType,
+ kN32_SkColorType,
kRGB_565_SkColorType,
};
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index b2ecb0f3ab..705f0666a4 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -189,7 +189,7 @@ public:
}
info->fWidth = TestImageGenerator::Width();
info->fHeight = TestImageGenerator::Height();
- info->fColorType = kPMColor_SkColorType;
+ info->fColorType = kN32_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 != kPMColor_SkColorType)) {
+ || (info.fColorType != kN32_SkColorType)) {
return false;
}
char* bytePtr = static_cast<char*>(pixels);
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 212b14ab3e..5c7e4738c2 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, kPMColor_SkColorType
+ kRGB_565_SkColorType, kN32_SkColorType
};
const int configCount = sizeof(colorTypes) / sizeof(SkBitmap::Config);
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index f778480bcb..9912643566 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 = kPMColor_SkColorType;
+ info->fColorType = kN32_SkColorType;
info->fAlphaType = kPremul_SkAlphaType;
return true;
}
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index 7b2f988ffc..5d52f906b2 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 kPMColor_SkColorType: return "PMColor";
+ case kN32_SkColorType: return "N32";
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.
- kPMColor_SkColorType
+ kN32_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 0ed062e681..804a7c4abe 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, kPMColor_SkColorType == wkbmp.colorType());
+ REPORTER_ASSERT(reporter, kN32_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 dfc7afa4fc..a039e55d02 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, kPMColor_SkColorType, kPremul_SkAlphaType);
+ kBitmapSize, kBitmapSize, kN32_SkColorType, kPremul_SkAlphaType);
return bitmap->allocPixels(info);
}
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 705ea14989..a3efd971d8 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, kPMColor_SkColorType == info.fColorType);
+ REPORTER_ASSERT(reporter, kN32_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 a1c978d1b1..a0e3051680 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() != kPMColor_SkColorType) {
+ canvasInfo.colorType() != kN32_SkColorType) {
return false;
}