OLD | NEW |
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 "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 | 431 |
432 SkAutoUnref aur0(fShader0); | 432 SkAutoUnref aur0(fShader0); |
433 SkAutoUnref aur1(fShader1); | 433 SkAutoUnref aur1(fShader1); |
434 | 434 |
435 make_strip(&fRecs[0], size.fX, size.fY); | 435 make_strip(&fRecs[0], size.fX, size.fY); |
436 make_fan(&fRecs[1], size.fX, size.fY); | 436 make_fan(&fRecs[1], size.fX, size.fY); |
437 make_tris(&fRecs[2]); | 437 make_tris(&fRecs[2]); |
438 | 438 |
439 SkPaint paint; | 439 SkPaint paint; |
440 paint.setDither(true); | 440 paint.setDither(true); |
441 paint.setFilterLevel(SkPaint::kLow_FilterLevel); | 441 paint.setFilterQuality(kLow_SkFilterQuality); |
442 | 442 |
443 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) { | 443 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) { |
444 canvas->save(); | 444 canvas->save(); |
445 | 445 |
446 paint.setShader(NULL); | 446 paint.setShader(NULL); |
447 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, | 447 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, |
448 fRecs[i].fVerts, fRecs[i].fTexs, | 448 fRecs[i].fVerts, fRecs[i].fTexs, |
449 NULL, NULL, NULL, 0, paint); | 449 NULL, NULL, NULL, 0, paint); |
450 | 450 |
451 canvas->translate(SkIntToScalar(210), 0); | 451 canvas->translate(SkIntToScalar(210), 0); |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 } | 718 } |
719 | 719 |
720 private: | 720 private: |
721 typedef SampleView INHERITED; | 721 typedef SampleView INHERITED; |
722 }; | 722 }; |
723 | 723 |
724 ////////////////////////////////////////////////////////////////////////////// | 724 ////////////////////////////////////////////////////////////////////////////// |
725 | 725 |
726 static SkView* MyFactory() { return new SlideView; } | 726 static SkView* MyFactory() { return new SlideView; } |
727 static SkViewRegister reg(MyFactory); | 727 static SkViewRegister reg(MyFactory); |
OLD | NEW |