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

Side by Side Diff: gm/beziereffects.cpp

Issue 1754563003: Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fAuditTrail uses Created 4 years, 9 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/bigrrectaaeffect.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
11 #include "gm.h" 11 #include "gm.h"
12 12
13 #if SK_SUPPORT_GPU 13 #if SK_SUPPORT_GPU
14 14
15 #include "GrDrawContext.h" 15 #include "GrDrawContextPriv.h"
16 #include "GrContext.h" 16 #include "GrContext.h"
17 #include "GrPathUtils.h" 17 #include "GrPathUtils.h"
18 #include "GrTest.h" 18 #include "GrTest.h"
19 #include "SkColorPriv.h" 19 #include "SkColorPriv.h"
20 #include "SkDevice.h" 20 #include "SkDevice.h"
21 #include "SkGeometry.h" 21 #include "SkGeometry.h"
22 22
23 #include "batches/GrTestBatch.h" 23 #include "batches/GrTestBatch.h"
24 24
25 #include "effects/GrBezierEffect.h" 25 #include "effects/GrBezierEffect.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->u nref(); 219 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->u nref();
220 pipelineBuilder.setRenderTarget(rt); 220 pipelineBuilder.setRenderTarget(rt);
221 221
222 BezierCubicOrConicTestBatch::Geometry geometry; 222 BezierCubicOrConicTestBatch::Geometry geometry;
223 geometry.fColor = color; 223 geometry.fColor = color;
224 geometry.fBounds = bounds; 224 geometry.fBounds = bounds;
225 225
226 SkAutoTUnref<GrDrawBatch> batch( 226 SkAutoTUnref<GrDrawBatch> batch(
227 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, klmSigns[c])); 227 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, klmSigns[c]));
228 228
229 drawContext->internal_drawBatch(pipelineBuilder, batch); 229 drawContext->drawContextPriv().testingOnly_drawBatch(pipelin eBuilder, batch);
230 } 230 }
231 ++col; 231 ++col;
232 if (numCols == col) { 232 if (numCols == col) {
233 col = 0; 233 col = 0;
234 ++row; 234 ++row;
235 } 235 }
236 } 236 }
237 } 237 }
238 } 238 }
239 239
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->u nref(); 360 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->u nref();
361 pipelineBuilder.setRenderTarget(rt); 361 pipelineBuilder.setRenderTarget(rt);
362 362
363 BezierCubicOrConicTestBatch::Geometry geometry; 363 BezierCubicOrConicTestBatch::Geometry geometry;
364 geometry.fColor = color; 364 geometry.fColor = color;
365 geometry.fBounds = bounds; 365 geometry.fBounds = bounds;
366 366
367 SkAutoTUnref<GrDrawBatch> batch( 367 SkAutoTUnref<GrDrawBatch> batch(
368 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, 1.f)); 368 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, 1.f));
369 369
370 drawContext->internal_drawBatch(pipelineBuilder, batch); 370 drawContext->drawContextPriv().testingOnly_drawBatch(pipelin eBuilder, batch);
371 } 371 }
372 ++col; 372 ++col;
373 if (numCols == col) { 373 if (numCols == col) {
374 col = 0; 374 col = 0;
375 ++row; 375 ++row;
376 } 376 }
377 } 377 }
378 } 378 }
379 } 379 }
380 380
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 GrPathUtils::QuadUVMatrix DevToUV(pts); 597 GrPathUtils::QuadUVMatrix DevToUV(pts);
598 598
599 BezierQuadTestBatch::Geometry geometry; 599 BezierQuadTestBatch::Geometry geometry;
600 geometry.fColor = color; 600 geometry.fColor = color;
601 geometry.fBounds = bounds; 601 geometry.fBounds = bounds;
602 602
603 SkAutoTUnref<GrDrawBatch> batch(BezierQuadTestBatch::Create( gp, geometry, 603 SkAutoTUnref<GrDrawBatch> batch(BezierQuadTestBatch::Create( gp, geometry,
604 DevToUV)); 604 DevToUV));
605 605
606 drawContext->internal_drawBatch(pipelineBuilder, batch); 606 drawContext->drawContextPriv().testingOnly_drawBatch(pipelin eBuilder, batch);
607 } 607 }
608 ++col; 608 ++col;
609 if (numCols == col) { 609 if (numCols == col) {
610 col = 0; 610 col = 0;
611 ++row; 611 ++row;
612 } 612 }
613 } 613 }
614 } 614 }
615 } 615 }
616 616
617 private: 617 private:
618 typedef GM INHERITED; 618 typedef GM INHERITED;
619 }; 619 };
620 620
621 DEF_GM(return new BezierCubicEffects;) 621 DEF_GM(return new BezierCubicEffects;)
622 DEF_GM(return new BezierConicEffects;) 622 DEF_GM(return new BezierConicEffects;)
623 DEF_GM(return new BezierQuadEffects;) 623 DEF_GM(return new BezierQuadEffects;)
624 } 624 }
625 625
626 #endif 626 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/bigrrectaaeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698