aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-11 13:47:30 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-11 13:47:30 +0000
commit96edc2459820f0f60ea9b57959c1e5018ef95e28 (patch)
tree96c92f8d88e4fbc4168e57f88dcd6b913042f52b /gm
parent968757e17dafee5dc32fb54d5f10c23307aaaca2 (diff)
Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
Reason for revert: Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now. 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/234833003 git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/bitmapcopy.cpp2
-rw-r--r--gm/bitmapfilters.cpp2
-rw-r--r--gm/bitmappremul.cpp4
-rw-r--r--gm/gammatext.cpp2
-rw-r--r--gm/gmmain.cpp8
-rw-r--r--gm/tilemodes.cpp4
-rw-r--r--gm/tilemodes_scaled.cpp4
7 files changed, 13 insertions, 13 deletions
diff --git a/gm/bitmapcopy.cpp b/gm/bitmapcopy.cpp
index b441e34f56..36b711e994 100644
--- a/gm/bitmapcopy.cpp
+++ b/gm/bitmapcopy.cpp
@@ -22,7 +22,7 @@ static const char* gColorTypeNames[] = {
static const SkColorType gColorTypes[] = {
kRGB_565_SkColorType,
kARGB_4444_SkColorType,
- kN32_SkColorType,
+ kPMColor_SkColorType,
};
#define NUM_CONFIGS SK_ARRAY_COUNT(gColorTypes)
diff --git a/gm/bitmapfilters.cpp b/gm/bitmapfilters.cpp
index 5fa213062b..fb3b304eb9 100644
--- a/gm/bitmapfilters.cpp
+++ b/gm/bitmapfilters.cpp
@@ -87,7 +87,7 @@ class FilterGM : public GM {
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);
}
public:
SkBitmap fBM8, fBM4444, fBM16, fBM32;
diff --git a/gm/bitmappremul.cpp b/gm/bitmappremul.cpp
index e315fafdde..fd563eb775 100644
--- a/gm/bitmappremul.cpp
+++ b/gm/bitmappremul.cpp
@@ -30,7 +30,7 @@ static void init_bitmap(SkColorType ct, SkBitmap* bitmap) {
static SkBitmap make_argb8888_gradient() {
SkBitmap bitmap;
- init_bitmap(kN32_SkColorType, &bitmap);
+ init_bitmap(kPMColor_SkColorType, &bitmap);
uint8_t rowColor = 0;
for (int y = 0; y < SLIDE_SIZE; y++) {
uint32_t* dst = bitmap.getAddr32(0, y);
@@ -64,7 +64,7 @@ static SkBitmap make_argb4444_gradient() {
static SkBitmap make_argb8888_stripes() {
SkBitmap bitmap;
- init_bitmap(kN32_SkColorType, &bitmap);
+ init_bitmap(kPMColor_SkColorType, &bitmap);
uint8_t rowColor = 0;
for (int y = 0; y < SLIDE_SIZE; y++) {
uint32_t* dst = bitmap.getAddr32(0, y);
diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp
index f520754123..7ee55db2fb 100644
--- a/gm/gammatext.cpp
+++ b/gm/gammatext.cpp
@@ -40,7 +40,7 @@ static bool setFont(SkPaint* paint, const char name[]) {
static CGContextRef makeCG(const SkImageInfo& info, const void* addr,
size_t rowBytes) {
- if (kN32_SkColorType != info.colorType() || NULL == addr) {
+ if (kPMColor_SkColorType != info.colorType() || NULL == addr) {
return NULL;
}
CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB();
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 03556e70e9..52e7332b64 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -268,7 +268,7 @@ public:
static void force_all_opaque(const SkBitmap& bitmap) {
SkColorType colorType = bitmap.colorType();
switch (colorType) {
- case kN32_SkColorType:
+ case kPMColor_SkColorType:
force_all_opaque_8888(bitmap);
break;
case kRGB_565_SkColorType:
@@ -294,7 +294,7 @@ public:
// from this method, we should be able to get rid of the
// transformation to 8888 format also.
SkBitmap copy;
- bitmap.copyTo(&copy, kN32_SkColorType);
+ bitmap.copyTo(&copy, kPMColor_SkColorType);
if (!SkImageEncoder::EncodeFile(path.c_str(), copy,
SkImageEncoder::kPNG_Type,
100)) {
@@ -740,8 +740,8 @@ public:
return;
}
- if ((kN32_SkColorType != expectedBitmap.colorType()) ||
- (kN32_SkColorType != actualBitmap.colorType())) {
+ if ((kPMColor_SkColorType != expectedBitmap.colorType()) ||
+ (kPMColor_SkColorType != actualBitmap.colorType())) {
SkDebugf("---- %s: not computing max per-channel pixel mismatch because non-8888\n",
testName);
return;
diff --git a/gm/tilemodes.cpp b/gm/tilemodes.cpp
index abecadae9a..5b97f13fc8 100644
--- a/gm/tilemodes.cpp
+++ b/gm/tilemodes.cpp
@@ -50,7 +50,7 @@ static void setup(SkPaint* paint, const SkBitmap& bm, bool filter,
}
static const SkColorType gColorTypes[] = {
- kN32_SkColorType,
+ kPMColor_SkColorType,
kRGB_565_SkColorType,
};
@@ -166,7 +166,7 @@ static const int gHeight = 32;
static SkShader* make_bm(SkShader::TileMode tx, SkShader::TileMode ty) {
SkBitmap bm;
- makebm(&bm, kN32_SkColorType, gWidth, gHeight);
+ makebm(&bm, kPMColor_SkColorType, gWidth, gHeight);
return SkShader::CreateBitmapShader(bm, tx, ty);
}
diff --git a/gm/tilemodes_scaled.cpp b/gm/tilemodes_scaled.cpp
index bbb86a70fd..932d3f7220 100644
--- a/gm/tilemodes_scaled.cpp
+++ b/gm/tilemodes_scaled.cpp
@@ -50,7 +50,7 @@ static void setup(SkPaint* paint, const SkBitmap& bm, SkPaint::FilterLevel filte
}
static const SkColorType gColorTypes[] = {
- kN32_SkColorType,
+ kPMColor_SkColorType,
kRGB_565_SkColorType,
};
@@ -177,7 +177,7 @@ static const int gHeight = 32;
static SkShader* make_bm(SkShader::TileMode tx, SkShader::TileMode ty) {
SkBitmap bm;
- makebm(&bm, kN32_SkColorType, gWidth, gHeight);
+ makebm(&bm, kPMColor_SkColorType, gWidth, gHeight);
return SkShader::CreateBitmapShader(bm, tx, ty);
}