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

Side by Side Diff: samplecode/SampleVertices.cpp

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « samplecode/SampleTiling.cpp ('k') | src/animator/SkDrawPaint.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 return true; 84 return true;
85 } 85 }
86 return this->INHERITED::onQuery(evt); 86 return this->INHERITED::onQuery(evt);
87 } 87 }
88 88
89 SkScalar fScale; 89 SkScalar fScale;
90 90
91 virtual void onDrawContent(SkCanvas* canvas) { 91 virtual void onDrawContent(SkCanvas* canvas) {
92 SkPaint paint; 92 SkPaint paint;
93 paint.setDither(true); 93 paint.setDither(true);
94 paint.setFilterBitmap(true); 94 paint.setFilterLevel(SkPaint::kLow_FilterLevel);
95 95
96 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) { 96 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) {
97 canvas->save(); 97 canvas->save();
98 98
99 paint.setShader(NULL); 99 paint.setShader(NULL);
100 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, 100 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount,
101 fRecs[i].fVerts, fRecs[i].fTexs, 101 fRecs[i].fVerts, fRecs[i].fTexs,
102 NULL, NULL, NULL, 0, paint); 102 NULL, NULL, NULL, 0, paint);
103 103
104 canvas->translate(SkIntToScalar(250), 0); 104 canvas->translate(SkIntToScalar(250), 0);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 Rec fRecs[3]; 225 Rec fRecs[3];
226 226
227 typedef SampleView INHERITED; 227 typedef SampleView INHERITED;
228 }; 228 };
229 229
230 ////////////////////////////////////////////////////////////////////////////// 230 //////////////////////////////////////////////////////////////////////////////
231 231
232 static SkView* MyFactory() { return new VerticesView; } 232 static SkView* MyFactory() { return new VerticesView; }
233 static SkViewRegister reg(MyFactory); 233 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleTiling.cpp ('k') | src/animator/SkDrawPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698