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

Side by Side Diff: samplecode/SamplePatch.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/SampleFilterFuzz.cpp ('k') | samplecode/SampleSlides.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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 if (SampleCode::TitleQ(*evt)) { 262 if (SampleCode::TitleQ(*evt)) {
263 SampleCode::TitleR(evt, "Patch"); 263 SampleCode::TitleR(evt, "Patch");
264 return true; 264 return true;
265 } 265 }
266 return this->INHERITED::onQuery(evt); 266 return this->INHERITED::onQuery(evt);
267 } 267 }
268 268
269 virtual void onDrawContent(SkCanvas* canvas) { 269 virtual void onDrawContent(SkCanvas* canvas) {
270 SkPaint paint; 270 SkPaint paint;
271 paint.setDither(true); 271 paint.setDither(true);
272 paint.setFilterBitmap(true); 272 paint.setFilterLevel(SkPaint::kLow_FilterLevel);
273 273
274 canvas->translate(SkIntToScalar(20), 0); 274 canvas->translate(SkIntToScalar(20), 0);
275 275
276 Patch patch; 276 Patch patch;
277 277
278 paint.setShader(fShader0); 278 paint.setShader(fShader0);
279 if (fSize0.fX == 0) { 279 if (fSize0.fX == 0) {
280 fSize0.fX = 1; 280 fSize0.fX = 1;
281 } 281 }
282 if (fSize0.fY == 0) { 282 if (fSize0.fY == 0) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 328
329 private: 329 private:
330 typedef SampleView INHERITED; 330 typedef SampleView INHERITED;
331 }; 331 };
332 332
333 ////////////////////////////////////////////////////////////////////////////// 333 //////////////////////////////////////////////////////////////////////////////
334 334
335 static SkView* MyFactory() { return new PatchView; } 335 static SkView* MyFactory() { return new PatchView; }
336 static SkViewRegister reg(MyFactory); 336 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698