Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: gm/beziereffects.cpp

Issue 1139723004: Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: tweaks Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698