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

Side by Side Diff: samplecode/SampleDitherBitmap.cpp

Issue 227433009: Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/SampleApp.cpp ('k') | samplecode/SampleEncode.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 "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 class DitherBitmapView : public SampleView { 79 class DitherBitmapView : public SampleView {
80 SkBitmap fBM8; 80 SkBitmap fBM8;
81 SkBitmap fBM32; 81 SkBitmap fBM32;
82 bool fResult; 82 bool fResult;
83 public: 83 public:
84 DitherBitmapView() { 84 DitherBitmapView() {
85 fResult = test_pathregion(); 85 fResult = test_pathregion();
86 fBM8 = make_bitmap(); 86 fBM8 = make_bitmap();
87 fBM8.copyTo(&fBM32, kPMColor_SkColorType); 87 fBM8.copyTo(&fBM32, kN32_SkColorType);
88 88
89 this->setBGColor(0xFFDDDDDD); 89 this->setBGColor(0xFFDDDDDD);
90 } 90 }
91 91
92 protected: 92 protected:
93 // overrides from SkEventSink 93 // overrides from SkEventSink
94 virtual bool onQuery(SkEvent* evt) { 94 virtual bool onQuery(SkEvent* evt) {
95 if (SampleCode::TitleQ(*evt)) { 95 if (SampleCode::TitleQ(*evt)) {
96 SampleCode::TitleR(evt, "DitherBitmap"); 96 SampleCode::TitleR(evt, "DitherBitmap");
97 return true; 97 return true;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 private: 144 private:
145 typedef SampleView INHERITED; 145 typedef SampleView INHERITED;
146 }; 146 };
147 147
148 ////////////////////////////////////////////////////////////////////////////// 148 //////////////////////////////////////////////////////////////////////////////
149 149
150 static SkView* MyFactory() { return new DitherBitmapView; } 150 static SkView* MyFactory() { return new DitherBitmapView; }
151 static SkViewRegister reg(MyFactory); 151 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleEncode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698