Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: gm/bitmapfilters.cpp

Issue 234833003: Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/bitmapcopy.cpp ('k') | gm/bitmappremul.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 9
10 namespace skiagm { 10 namespace skiagm {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 class FilterGM : public GM { 80 class FilterGM : public GM {
81 bool fOnce; 81 bool fOnce;
82 void init() { 82 void init() {
83 if (fOnce) { 83 if (fOnce) {
84 return; 84 return;
85 } 85 }
86 fOnce = true; 86 fOnce = true;
87 make_bm(&fBM8); 87 make_bm(&fBM8);
88 fBM8.copyTo(&fBM4444, kARGB_4444_SkColorType); 88 fBM8.copyTo(&fBM4444, kARGB_4444_SkColorType);
89 fBM8.copyTo(&fBM16, kRGB_565_SkColorType); 89 fBM8.copyTo(&fBM16, kRGB_565_SkColorType);
90 fBM8.copyTo(&fBM32, kN32_SkColorType); 90 fBM8.copyTo(&fBM32, kPMColor_SkColorType);
91 } 91 }
92 public: 92 public:
93 SkBitmap fBM8, fBM4444, fBM16, fBM32; 93 SkBitmap fBM8, fBM4444, fBM16, fBM32;
94 94
95 FilterGM() : fOnce(false) { 95 FilterGM() : fOnce(false) {
96 this->setBGColor(0xFFDDDDDD); 96 this->setBGColor(0xFFDDDDDD);
97 } 97 }
98 98
99 protected: 99 protected:
100 virtual SkString onShortName() { 100 virtual SkString onShortName() {
(...skipping 23 matching lines...) Expand all
124 private: 124 private:
125 typedef GM INHERITED; 125 typedef GM INHERITED;
126 }; 126 };
127 127
128 ////////////////////////////////////////////////////////////////////////////// 128 //////////////////////////////////////////////////////////////////////////////
129 129
130 static GM* MyFactory(void*) { return new FilterGM; } 130 static GM* MyFactory(void*) { return new FilterGM; }
131 static GMRegistry reg(MyFactory); 131 static GMRegistry reg(MyFactory);
132 132
133 } 133 }
OLDNEW
« no previous file with comments | « gm/bitmapcopy.cpp ('k') | gm/bitmappremul.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698