OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SampleCode.h" | 8 #include "SampleCode.h" |
9 #include "SkAnimTimer.h" | 9 #include "SkAnimTimer.h" |
10 #include "SkView.h" | 10 #include "SkView.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 269 } |
270 return this->INHERITED::onQuery(evt); | 270 return this->INHERITED::onQuery(evt); |
271 } | 271 } |
272 | 272 |
273 virtual void onDrawContent(SkCanvas* canvas) { | 273 virtual void onDrawContent(SkCanvas* canvas) { |
274 const int nu = 10; | 274 const int nu = 10; |
275 const int nv = 10; | 275 const int nv = 10; |
276 | 276 |
277 SkPaint paint; | 277 SkPaint paint; |
278 paint.setDither(true); | 278 paint.setDither(true); |
279 paint.setFilterLevel(SkPaint::kLow_FilterLevel); | 279 paint.setFilterQuality(kLow_SkFilterQuality); |
280 | 280 |
281 canvas->translate(DX, DY); | 281 canvas->translate(DX, DY); |
282 | 282 |
283 Patch patch; | 283 Patch patch; |
284 | 284 |
285 paint.setShader(fShader0); | 285 paint.setShader(fShader0); |
286 if (fSize0.fX == 0) { | 286 if (fSize0.fX == 0) { |
287 fSize0.fX = 1; | 287 fSize0.fX = 1; |
288 } | 288 } |
289 if (fSize0.fY == 0) { | 289 if (fSize0.fY == 0) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 } | 353 } |
354 | 354 |
355 private: | 355 private: |
356 typedef SampleView INHERITED; | 356 typedef SampleView INHERITED; |
357 }; | 357 }; |
358 | 358 |
359 ////////////////////////////////////////////////////////////////////////////// | 359 ////////////////////////////////////////////////////////////////////////////// |
360 | 360 |
361 static SkView* MyFactory() { return new PatchView; } | 361 static SkView* MyFactory() { return new PatchView; } |
362 static SkViewRegister reg(MyFactory); | 362 static SkViewRegister reg(MyFactory); |
OLD | NEW |