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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 437 |
438 SkAutoUnref aur0(fShader0); | 438 SkAutoUnref aur0(fShader0); |
439 SkAutoUnref aur1(fShader1); | 439 SkAutoUnref aur1(fShader1); |
440 | 440 |
441 make_strip(&fRecs[0], size.fX, size.fY); | 441 make_strip(&fRecs[0], size.fX, size.fY); |
442 make_fan(&fRecs[1], size.fX, size.fY); | 442 make_fan(&fRecs[1], size.fX, size.fY); |
443 make_tris(&fRecs[2]); | 443 make_tris(&fRecs[2]); |
444 | 444 |
445 SkPaint paint; | 445 SkPaint paint; |
446 paint.setDither(true); | 446 paint.setDither(true); |
447 paint.setFilterBitmap(true); | 447 paint.setFilterLevel(SkPaint::kLow_FilterLevel); |
448 | 448 |
449 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) { | 449 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) { |
450 canvas->save(); | 450 canvas->save(); |
451 | 451 |
452 paint.setShader(NULL); | 452 paint.setShader(NULL); |
453 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, | 453 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, |
454 fRecs[i].fVerts, fRecs[i].fTexs, | 454 fRecs[i].fVerts, fRecs[i].fTexs, |
455 NULL, NULL, NULL, 0, paint); | 455 NULL, NULL, NULL, 0, paint); |
456 | 456 |
457 canvas->translate(SkIntToScalar(210), 0); | 457 canvas->translate(SkIntToScalar(210), 0); |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 } | 725 } |
726 | 726 |
727 private: | 727 private: |
728 typedef SampleView INHERITED; | 728 typedef SampleView INHERITED; |
729 }; | 729 }; |
730 | 730 |
731 ////////////////////////////////////////////////////////////////////////////// | 731 ////////////////////////////////////////////////////////////////////////////// |
732 | 732 |
733 static SkView* MyFactory() { return new SlideView; } | 733 static SkView* MyFactory() { return new SlideView; } |
734 static SkViewRegister reg(MyFactory); | 734 static SkViewRegister reg(MyFactory); |
OLD | NEW |