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

Side by Side Diff: samplecode/SampleTiling.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 | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkBitmap.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, 50 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter,
51 SkShader::TileMode tmx, SkShader::TileMode tmy) { 51 SkShader::TileMode tmx, SkShader::TileMode tmy) {
52 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); 52 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy);
53 paint->setShader(shader)->unref(); 53 paint->setShader(shader)->unref();
54 paint->setFilterLevel(filter ? SkPaint::kLow_FilterLevel : SkPaint::kNone_Fi lterLevel); 54 paint->setFilterLevel(filter ? SkPaint::kLow_FilterLevel : SkPaint::kNone_Fi lterLevel);
55 } 55 }
56 56
57 static const SkColorType gColorTypes[] = { 57 static const SkColorType gColorTypes[] = {
58 kN32_SkColorType, 58 kPMColor_SkColorType,
59 kRGB_565_SkColorType, 59 kRGB_565_SkColorType,
60 }; 60 };
61 static const int gWidth = 32; 61 static const int gWidth = 32;
62 static const int gHeight = 32; 62 static const int gHeight = 32;
63 63
64 class TilingView : public SampleView { 64 class TilingView : public SampleView {
65 SkPicture* fTextPicture; 65 SkPicture* fTextPicture;
66 SkBlurDrawLooper fLooper; 66 SkBlurDrawLooper fLooper;
67 public: 67 public:
68 TilingView() 68 TilingView()
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 private: 166 private:
167 typedef SampleView INHERITED; 167 typedef SampleView INHERITED;
168 }; 168 };
169 169
170 ////////////////////////////////////////////////////////////////////////////// 170 //////////////////////////////////////////////////////////////////////////////
171 171
172 static SkView* MyFactory() { return new TilingView; } 172 static SkView* MyFactory() { return new TilingView; }
173 static SkViewRegister reg(MyFactory); 173 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698