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

Side by Side Diff: samplecode/SampleFilter.cpp

Issue 233813004: Revert of 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 | « samplecode/SampleEncode.cpp ('k') | samplecode/SampleFilterFuzz.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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 class FilterView : public SampleView { 86 class FilterView : public SampleView {
87 public: 87 public:
88 SkBitmap fBM8, fBM4444, fBM16, fBM32; 88 SkBitmap fBM8, fBM4444, fBM16, fBM32;
89 89
90 FilterView() { 90 FilterView() {
91 make_bm(&fBM8); 91 make_bm(&fBM8);
92 fBM8.copyTo(&fBM4444, kARGB_4444_SkColorType); 92 fBM8.copyTo(&fBM4444, kARGB_4444_SkColorType);
93 fBM8.copyTo(&fBM16, kRGB_565_SkColorType); 93 fBM8.copyTo(&fBM16, kRGB_565_SkColorType);
94 fBM8.copyTo(&fBM32, kPMColor_SkColorType); 94 fBM8.copyTo(&fBM32, kN32_SkColorType);
95 95
96 this->setBGColor(0xFFDDDDDD); 96 this->setBGColor(0xFFDDDDDD);
97 } 97 }
98 98
99 protected: 99 protected:
100 // overrides from SkEventSink 100 // overrides from SkEventSink
101 virtual bool onQuery(SkEvent* evt) { 101 virtual bool onQuery(SkEvent* evt) {
102 if (SampleCode::TitleQ(*evt)) { 102 if (SampleCode::TitleQ(*evt)) {
103 SampleCode::TitleR(evt, "Filter"); 103 SampleCode::TitleR(evt, "Filter");
104 return true; 104 return true;
(...skipping 16 matching lines...) Expand all
121 } 121 }
122 122
123 private: 123 private:
124 typedef SampleView INHERITED; 124 typedef SampleView INHERITED;
125 }; 125 };
126 126
127 ////////////////////////////////////////////////////////////////////////////// 127 //////////////////////////////////////////////////////////////////////////////
128 128
129 static SkView* MyFactory() { return new FilterView; } 129 static SkView* MyFactory() { return new FilterView; }
130 static SkViewRegister reg(MyFactory); 130 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleEncode.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698