| 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 "SkView.h" | 9 #include "SkView.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return true; | 83 return true; |
| 84 } | 84 } |
| 85 return this->INHERITED::onQuery(evt); | 85 return this->INHERITED::onQuery(evt); |
| 86 } | 86 } |
| 87 | 87 |
| 88 SkScalar fScale; | 88 SkScalar fScale; |
| 89 | 89 |
| 90 void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { | 90 void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { |
| 91 SkPaint paint; | 91 SkPaint paint; |
| 92 paint.setDither(true); | 92 paint.setDither(true); |
| 93 paint.setFilterLevel(SkPaint::kLow_FilterLevel); | 93 paint.setFilterQuality(kLow_SkFilterQuality); |
| 94 | 94 |
| 95 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) { | 95 for (size_t i = 0; i < SK_ARRAY_COUNT(fRecs); i++) { |
| 96 canvas->save(); | 96 canvas->save(); |
| 97 | 97 |
| 98 paint.setShader(NULL); | 98 paint.setShader(NULL); |
| 99 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, | 99 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, |
| 100 fRecs[i].fVerts, fRecs[i].fTexs, | 100 fRecs[i].fVerts, fRecs[i].fTexs, |
| 101 NULL, NULL, NULL, 0, paint); | 101 NULL, NULL, NULL, 0, paint); |
| 102 | 102 |
| 103 canvas->translate(SkIntToScalar(250), 0); | 103 canvas->translate(SkIntToScalar(250), 0); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 Rec fRecs[3]; | 224 Rec fRecs[3]; |
| 225 | 225 |
| 226 typedef SampleView INHERITED; | 226 typedef SampleView INHERITED; |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 ////////////////////////////////////////////////////////////////////////////// | 229 ////////////////////////////////////////////////////////////////////////////// |
| 230 | 230 |
| 231 static SkView* MyFactory() { return new VerticesView; } | 231 static SkView* MyFactory() { return new VerticesView; } |
| 232 static SkViewRegister reg(MyFactory); | 232 static SkViewRegister reg(MyFactory); |
| OLD | NEW |