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

Side by Side Diff: src/gpu/GrOvalRenderer.cpp

Issue 1313573005: Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Created 5 years, 3 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 | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrProcessor.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool fStroke; 196 bool fStroke;
197 bool fUsesLocalCoords; 197 bool fUsesLocalCoords;
198 198
199 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 199 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
200 200
201 typedef GrGeometryProcessor INHERITED; 201 typedef GrGeometryProcessor INHERITED;
202 }; 202 };
203 203
204 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(CircleEdgeEffect); 204 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(CircleEdgeEffect);
205 205
206 const GrGeometryProcessor* CircleEdgeEffect::TestCreate(GrProcessorTestData* d) { 206 GrGeometryProcessor* CircleEdgeEffect::TestCreate(GrProcessorTestData* d) {
207 return CircleEdgeEffect::Create(GrRandomColor(d->fRandom), 207 return CircleEdgeEffect::Create(GrRandomColor(d->fRandom),
208 d->fRandom->nextBool(), 208 d->fRandom->nextBool(),
209 GrTest::TestMatrix(d->fRandom), 209 GrTest::TestMatrix(d->fRandom),
210 d->fRandom->nextBool()); 210 d->fRandom->nextBool());
211 } 211 }
212 212
213 /////////////////////////////////////////////////////////////////////////////// 213 ///////////////////////////////////////////////////////////////////////////////
214 214
215 /** 215 /**
216 * The output of this effect is a modulation of the input color and coverage for an axis-aligned 216 * The output of this effect is a modulation of the input color and coverage for an axis-aligned
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 bool fStroke; 375 bool fStroke;
376 bool fUsesLocalCoords; 376 bool fUsesLocalCoords;
377 377
378 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 378 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
379 379
380 typedef GrGeometryProcessor INHERITED; 380 typedef GrGeometryProcessor INHERITED;
381 }; 381 };
382 382
383 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(EllipseEdgeEffect); 383 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(EllipseEdgeEffect);
384 384
385 const GrGeometryProcessor* EllipseEdgeEffect::TestCreate(GrProcessorTestData* d) { 385 GrGeometryProcessor* EllipseEdgeEffect::TestCreate(GrProcessorTestData* d) {
386 return EllipseEdgeEffect::Create(GrRandomColor(d->fRandom), 386 return EllipseEdgeEffect::Create(GrRandomColor(d->fRandom),
387 d->fRandom->nextBool(), 387 d->fRandom->nextBool(),
388 GrTest::TestMatrix(d->fRandom), 388 GrTest::TestMatrix(d->fRandom),
389 d->fRandom->nextBool()); 389 d->fRandom->nextBool());
390 } 390 }
391 391
392 /////////////////////////////////////////////////////////////////////////////// 392 ///////////////////////////////////////////////////////////////////////////////
393 393
394 /** 394 /**
395 * The output of this effect is a modulation of the input color and coverage for an ellipse, 395 * The output of this effect is a modulation of the input color and coverage for an ellipse,
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 Mode fMode; 576 Mode fMode;
577 bool fUsesLocalCoords; 577 bool fUsesLocalCoords;
578 578
579 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 579 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
580 580
581 typedef GrGeometryProcessor INHERITED; 581 typedef GrGeometryProcessor INHERITED;
582 }; 582 };
583 583
584 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DIEllipseEdgeEffect); 584 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DIEllipseEdgeEffect);
585 585
586 const GrGeometryProcessor* DIEllipseEdgeEffect::TestCreate(GrProcessorTestData* d) { 586 GrGeometryProcessor* DIEllipseEdgeEffect::TestCreate(GrProcessorTestData* d) {
587 return DIEllipseEdgeEffect::Create(GrRandomColor(d->fRandom), 587 return DIEllipseEdgeEffect::Create(GrRandomColor(d->fRandom),
588 GrTest::TestMatrix(d->fRandom), 588 GrTest::TestMatrix(d->fRandom),
589 (Mode)(d->fRandom->nextRangeU(0,2)), 589 (Mode)(d->fRandom->nextRangeU(0,2)),
590 d->fRandom->nextBool()); 590 d->fRandom->nextBool());
591 } 591 }
592 592
593 /////////////////////////////////////////////////////////////////////////////// 593 ///////////////////////////////////////////////////////////////////////////////
594 594
595 bool GrOvalRenderer::DrawOval(GrDrawTarget* target, 595 bool GrOvalRenderer::DrawOval(GrDrawTarget* target,
596 const GrPipelineBuilder& pipelineBuilder, 596 const GrPipelineBuilder& pipelineBuilder,
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 } 2033 }
2034 2034
2035 DRAW_BATCH_TEST_DEFINE(RRectBatch) { 2035 DRAW_BATCH_TEST_DEFINE(RRectBatch) {
2036 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); 2036 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random);
2037 GrColor color = GrRandomColor(random); 2037 GrColor color = GrRandomColor(random);
2038 const SkRRect& rrect = GrTest::TestRRectSimple(random); 2038 const SkRRect& rrect = GrTest::TestRRectSimple(random);
2039 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom)); 2039 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom));
2040 } 2040 }
2041 2041
2042 #endif 2042 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698