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

Side by Side Diff: samplecode/SampleFilter.cpp

Issue 83093005: remove kA1_Config, as it is no longer supported (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, SkPaint* p ) { 60 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, SkPaint* p ) {
61 x += draw_bm(c, bm, x, 0, p); 61 x += draw_bm(c, bm, x, 0, p);
62 p->setFilterLevel(SkPaint::kLow_FilterLevel); 62 p->setFilterLevel(SkPaint::kLow_FilterLevel);
63 x += draw_bm(c, bm, x, 0, p); 63 x += draw_bm(c, bm, x, 0, p);
64 p->setDither(true); 64 p->setDither(true);
65 return x + draw_bm(c, bm, x, 0, p); 65 return x + draw_bm(c, bm, x, 0, p);
66 } 66 }
67 67
68 static const char* gConfigNames[] = { 68 static const char* gConfigNames[] = {
69 "unknown config", 69 "unknown config",
70 "A1",
71 "A8", 70 "A8",
72 "Index8", 71 "Index8",
73 "565", 72 "565",
74 "4444", 73 "4444",
75 "8888" 74 "8888"
76 }; 75 };
77 76
78 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) { 77 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) {
79 SkAutoCanvasRestore acr(canvas, true); 78 SkAutoCanvasRestore acr(canvas, true);
80 79
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 134 }
136 135
137 private: 136 private:
138 typedef SampleView INHERITED; 137 typedef SampleView INHERITED;
139 }; 138 };
140 139
141 ////////////////////////////////////////////////////////////////////////////// 140 //////////////////////////////////////////////////////////////////////////////
142 141
143 static SkView* MyFactory() { return new FilterView; } 142 static SkView* MyFactory() { return new FilterView; }
144 static SkViewRegister reg(MyFactory); 143 static SkViewRegister reg(MyFactory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698