OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 | 8 |
9 // This test only works with the GPU backend. | 9 // This test only works with the GPU backend. |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 return make_isize(800, 800); | 51 return make_isize(800, 800); |
52 } | 52 } |
53 | 53 |
54 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 54 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
55 // This is a GPU-specific GM. | 55 // This is a GPU-specific GM. |
56 return kGPUOnly_Flag; | 56 return kGPUOnly_Flag; |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 60 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
61 SkDevice* device = canvas->getTopDevice(); | 61 SkBaseDevice* device = canvas->getTopDevice(); |
62 GrRenderTarget* rt = device->accessRenderTarget(); | 62 GrRenderTarget* rt = device->accessRenderTarget(); |
63 if (NULL == rt) { | 63 if (NULL == rt) { |
64 return; | 64 return; |
65 } | 65 } |
66 GrContext* context = rt->getContext(); | 66 GrContext* context = rt->getContext(); |
67 if (NULL == context) { | 67 if (NULL == context) { |
68 return; | 68 return; |
69 } | 69 } |
70 | 70 |
71 struct Vertex { | 71 struct Vertex { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 return make_isize(800, 800); | 203 return make_isize(800, 800); |
204 } | 204 } |
205 | 205 |
206 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 206 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
207 // This is a GPU-specific GM. | 207 // This is a GPU-specific GM. |
208 return kGPUOnly_Flag; | 208 return kGPUOnly_Flag; |
209 } | 209 } |
210 | 210 |
211 | 211 |
212 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 212 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
213 SkDevice* device = canvas->getTopDevice(); | 213 SkBaseDevice* device = canvas->getTopDevice(); |
214 GrRenderTarget* rt = device->accessRenderTarget(); | 214 GrRenderTarget* rt = device->accessRenderTarget(); |
215 if (NULL == rt) { | 215 if (NULL == rt) { |
216 return; | 216 return; |
217 } | 217 } |
218 GrContext* context = rt->getContext(); | 218 GrContext* context = rt->getContext(); |
219 if (NULL == context) { | 219 if (NULL == context) { |
220 return; | 220 return; |
221 } | 221 } |
222 | 222 |
223 struct Vertex { | 223 struct Vertex { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 return make_isize(800, 800); | 388 return make_isize(800, 800); |
389 } | 389 } |
390 | 390 |
391 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 391 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
392 // This is a GPU-specific GM. | 392 // This is a GPU-specific GM. |
393 return kGPUOnly_Flag; | 393 return kGPUOnly_Flag; |
394 } | 394 } |
395 | 395 |
396 | 396 |
397 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 397 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
398 SkDevice* device = canvas->getTopDevice(); | 398 SkBaseDevice* device = canvas->getTopDevice(); |
399 GrRenderTarget* rt = device->accessRenderTarget(); | 399 GrRenderTarget* rt = device->accessRenderTarget(); |
400 if (NULL == rt) { | 400 if (NULL == rt) { |
401 return; | 401 return; |
402 } | 402 } |
403 GrContext* context = rt->getContext(); | 403 GrContext* context = rt->getContext(); |
404 if (NULL == context) { | 404 if (NULL == context) { |
405 return; | 405 return; |
406 } | 406 } |
407 | 407 |
408 struct Vertex { | 408 struct Vertex { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 typedef GM INHERITED; | 509 typedef GM INHERITED; |
510 }; | 510 }; |
511 | 511 |
512 DEF_GM( return SkNEW(BezierCubicEffects); ) | 512 DEF_GM( return SkNEW(BezierCubicEffects); ) |
513 DEF_GM( return SkNEW(BezierConicEffects); ) | 513 DEF_GM( return SkNEW(BezierConicEffects); ) |
514 DEF_GM( return SkNEW(BezierQuadEffects); ) | 514 DEF_GM( return SkNEW(BezierQuadEffects); ) |
515 | 515 |
516 } | 516 } |
517 | 517 |
518 #endif | 518 #endif |
OLD | NEW |