| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 for(int edgeType = 0; edgeType < kGrProcessorEdgeTypeCnt; ++edgeType
) { | 303 for(int edgeType = 0; edgeType < kGrProcessorEdgeTypeCnt; ++edgeType
) { |
| 304 SkAutoTUnref<GrGeometryProcessor> gp; | 304 SkAutoTUnref<GrGeometryProcessor> gp; |
| 305 { // scope to contain GrTestTarget | 305 { // scope to contain GrTestTarget |
| 306 GrTestTarget tt; | 306 GrTestTarget tt; |
| 307 context->getTestTarget(&tt); | 307 context->getTestTarget(&tt); |
| 308 if (NULL == tt.target()) { | 308 if (NULL == tt.target()) { |
| 309 continue; | 309 continue; |
| 310 } | 310 } |
| 311 GrPrimitiveEdgeType et = (GrPrimitiveEdgeType)edgeType; | 311 GrPrimitiveEdgeType et = (GrPrimitiveEdgeType)edgeType; |
| 312 gp.reset(GrConicEffect::Create(color, SkMatrix::I(), et, | 312 gp.reset(GrConicEffect::Create(color, SkMatrix::I(), et, |
| 313 *tt.target()->caps(), SkMatri
x::I())); | 313 *tt.target()->caps(), SkMatri
x::I(), false)); |
| 314 if (!gp) { | 314 if (!gp) { |
| 315 continue; | 315 continue; |
| 316 } | 316 } |
| 317 } | 317 } |
| 318 | 318 |
| 319 SkScalar x = SkScalarMul(col, w); | 319 SkScalar x = SkScalarMul(col, w); |
| 320 SkScalar y = SkScalarMul(row, h); | 320 SkScalar y = SkScalarMul(row, h); |
| 321 SkPoint controlPts[] = { | 321 SkPoint controlPts[] = { |
| 322 {x + baseControlPts[0].fX, y + baseControlPts[0].fY}, | 322 {x + baseControlPts[0].fX, y + baseControlPts[0].fY}, |
| 323 {x + baseControlPts[1].fX, y + baseControlPts[1].fY}, | 323 {x + baseControlPts[1].fX, y + baseControlPts[1].fY}, |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 for(int edgeType = 0; edgeType < kGrProcessorEdgeTypeCnt; ++edgeType
) { | 543 for(int edgeType = 0; edgeType < kGrProcessorEdgeTypeCnt; ++edgeType
) { |
| 544 SkAutoTUnref<GrGeometryProcessor> gp; | 544 SkAutoTUnref<GrGeometryProcessor> gp; |
| 545 { // scope to contain GrTestTarget | 545 { // scope to contain GrTestTarget |
| 546 GrTestTarget tt; | 546 GrTestTarget tt; |
| 547 context->getTestTarget(&tt); | 547 context->getTestTarget(&tt); |
| 548 if (NULL == tt.target()) { | 548 if (NULL == tt.target()) { |
| 549 continue; | 549 continue; |
| 550 } | 550 } |
| 551 GrPrimitiveEdgeType et = (GrPrimitiveEdgeType)edgeType; | 551 GrPrimitiveEdgeType et = (GrPrimitiveEdgeType)edgeType; |
| 552 gp.reset(GrQuadEffect::Create(color, SkMatrix::I(), et, | 552 gp.reset(GrQuadEffect::Create(color, SkMatrix::I(), et, |
| 553 *tt.target()->caps(), SkMatrix
::I())); | 553 *tt.target()->caps(), SkMatrix
::I(), false)); |
| 554 if (!gp) { | 554 if (!gp) { |
| 555 continue; | 555 continue; |
| 556 } | 556 } |
| 557 } | 557 } |
| 558 | 558 |
| 559 SkScalar x = SkScalarMul(col, w); | 559 SkScalar x = SkScalarMul(col, w); |
| 560 SkScalar y = SkScalarMul(row, h); | 560 SkScalar y = SkScalarMul(row, h); |
| 561 SkPoint controlPts[] = { | 561 SkPoint controlPts[] = { |
| 562 {x + baseControlPts[0].fX, y + baseControlPts[0].fY}, | 562 {x + baseControlPts[0].fX, y + baseControlPts[0].fY}, |
| 563 {x + baseControlPts[1].fX, y + baseControlPts[1].fY}, | 563 {x + baseControlPts[1].fX, y + baseControlPts[1].fY}, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 typedef GM INHERITED; | 627 typedef GM INHERITED; |
| 628 }; | 628 }; |
| 629 | 629 |
| 630 DEF_GM( return SkNEW(BezierCubicEffects); ) | 630 DEF_GM( return SkNEW(BezierCubicEffects); ) |
| 631 DEF_GM( return SkNEW(BezierConicEffects); ) | 631 DEF_GM( return SkNEW(BezierConicEffects); ) |
| 632 DEF_GM( return SkNEW(BezierQuadEffects); ) | 632 DEF_GM( return SkNEW(BezierQuadEffects); ) |
| 633 | 633 |
| 634 } | 634 } |
| 635 | 635 |
| 636 #endif | 636 #endif |
| OLD | NEW |