diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-11 17:15:40 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-11 17:15:40 +0000 |
commit | 28fcae2ec77eb16a79e155f8d788b20457f1c951 (patch) | |
tree | a79e8015d2dd76f5a2677ffcc19d2aede4c6b8bb /gm | |
parent | 4bffdf2a1034b4e8ae8c1b484769154f9d382a00 (diff) |
Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)
Reason for revert:
Want to reland the original CL.
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, bensong@google.com
TBR=bensong@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/235523003
git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/bitmapcopy.cpp | 2 | ||||
-rw-r--r-- | gm/bitmapfilters.cpp | 2 | ||||
-rw-r--r-- | gm/bitmappremul.cpp | 4 | ||||
-rw-r--r-- | gm/gammatext.cpp | 2 | ||||
-rw-r--r-- | gm/gmmain.cpp | 8 | ||||
-rw-r--r-- | gm/tilemodes.cpp | 4 | ||||
-rw-r--r-- | gm/tilemodes_scaled.cpp | 4 |
7 files changed, 13 insertions, 13 deletions
diff --git a/gm/bitmapcopy.cpp b/gm/bitmapcopy.cpp index 36b711e994..b441e34f56 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, - kPMColor_SkColorType, + kN32_SkColorType, }; #define NUM_CONFIGS SK_ARRAY_COUNT(gColorTypes) diff --git a/gm/bitmapfilters.cpp b/gm/bitmapfilters.cpp index fb3b304eb9..5fa213062b 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, kPMColor_SkColorType); + fBM8.copyTo(&fBM32, kN32_SkColorType); } public: SkBitmap fBM8, fBM4444, fBM16, fBM32; diff --git a/gm/bitmappremul.cpp b/gm/bitmappremul.cpp index fd563eb775..e315fafdde 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(kPMColor_SkColorType, &bitmap); + init_bitmap(kN32_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(kPMColor_SkColorType, &bitmap); + init_bitmap(kN32_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 7ee55db2fb..f520754123 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 (kPMColor_SkColorType != info.colorType() || NULL == addr) { + if (kN32_SkColorType != info.colorType() || NULL == addr) { return NULL; } CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index 52e7332b64..03556e70e9 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 kPMColor_SkColorType: + case kN32_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(©, kPMColor_SkColorType); + bitmap.copyTo(©, kN32_SkColorType); if (!SkImageEncoder::EncodeFile(path.c_str(), copy, SkImageEncoder::kPNG_Type, 100)) { @@ -740,8 +740,8 @@ public: return; } - if ((kPMColor_SkColorType != expectedBitmap.colorType()) || - (kPMColor_SkColorType != actualBitmap.colorType())) { + if ((kN32_SkColorType != expectedBitmap.colorType()) || + (kN32_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 5b97f13fc8..abecadae9a 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[] = { - kPMColor_SkColorType, + kN32_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, kPMColor_SkColorType, gWidth, gHeight); + makebm(&bm, kN32_SkColorType, gWidth, gHeight); return SkShader::CreateBitmapShader(bm, tx, ty); } diff --git a/gm/tilemodes_scaled.cpp b/gm/tilemodes_scaled.cpp index 932d3f7220..bbb86a70fd 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[] = { - kPMColor_SkColorType, + kN32_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, kPMColor_SkColorType, gWidth, gHeight); + makebm(&bm, kN32_SkColorType, gWidth, gHeight); return SkShader::CreateBitmapShader(bm, tx, ty); } |