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

Side by Side Diff: src/gpu/batches/GrAAStrokeRectBatch.cpp

Issue 1274513005: Rename GrPipelineInfo to GrPipelineOptimizations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 4 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/batches/GrAAStrokeRectBatch.h ('k') | src/gpu/batches/GrBatch.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "GrAAStrokeRectBatch.h" 8 #include "GrAAStrokeRectBatch.h"
9 9
10 #include "GrDefaultGeoProcFactory.h" 10 #include "GrDefaultGeoProcFactory.h"
(...skipping 25 matching lines...) Expand all
36 } else { 36 } else {
37 coverageType = Coverage::kAttribute_Type; 37 coverageType = Coverage::kAttribute_Type;
38 } 38 }
39 Coverage coverage(coverageType); 39 Coverage coverage(coverageType);
40 LocalCoords localCoords(usesLocalCoords ? LocalCoords::kUsePosition_Type : 40 LocalCoords localCoords(usesLocalCoords ? LocalCoords::kUsePosition_Type :
41 LocalCoords::kUnused_Type); 41 LocalCoords::kUnused_Type);
42 return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix); 42 return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix);
43 } 43 }
44 44
45 45
46 void GrAAStrokeRectBatch::initBatchTracker(const GrPipelineInfo& init) { 46 void GrAAStrokeRectBatch::initBatchTracker(const GrPipelineOptimizations& opt) {
47 // Handle any color overrides 47 // Handle any color overrides
48 if (!init.readsColor()) { 48 if (!opt.readsColor()) {
49 fGeoData[0].fColor = GrColor_ILLEGAL; 49 fGeoData[0].fColor = GrColor_ILLEGAL;
50 } 50 }
51 init.getOverrideColorIfSet(&fGeoData[0].fColor); 51 opt.getOverrideColorIfSet(&fGeoData[0].fColor);
52 52
53 // setup batch properties 53 // setup batch properties
54 fBatch.fColorIgnored = !init.readsColor(); 54 fBatch.fColorIgnored = !opt.readsColor();
55 fBatch.fColor = fGeoData[0].fColor; 55 fBatch.fColor = fGeoData[0].fColor;
56 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 56 fBatch.fUsesLocalCoords = opt.readsLocalCoords();
57 fBatch.fCoverageIgnored = !init.readsCoverage(); 57 fBatch.fCoverageIgnored = !opt.readsCoverage();
58 fBatch.fMiterStroke = fGeoData[0].fMiterStroke; 58 fBatch.fMiterStroke = fGeoData[0].fMiterStroke;
59 fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage(); 59 fBatch.fCanTweakAlphaForCoverage = opt.canTweakAlphaForCoverage();
60 } 60 }
61 61
62 void GrAAStrokeRectBatch::generateGeometry(GrBatchTarget* batchTarget) { 62 void GrAAStrokeRectBatch::generateGeometry(GrBatchTarget* batchTarget) {
63 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage(); 63 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage();
64 64
65 SkAutoTUnref<const GrGeometryProcessor> gp(create_stroke_rect_gp(canTweakAlp haForCoverage, 65 SkAutoTUnref<const GrGeometryProcessor> gp(create_stroke_rect_gp(canTweakAlp haForCoverage,
66 this->viewM atrix(), 66 this->viewM atrix(),
67 this->usesL ocalCoords(), 67 this->usesL ocalCoords(),
68 this->cover ageIgnored())); 68 this->cover ageIgnored()));
69 if (!gp) { 69 if (!gp) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 geo.fColor = GrRandomColor(random); 371 geo.fColor = GrRandomColor(random);
372 geo.fDevOutside = outside; 372 geo.fDevOutside = outside;
373 geo.fDevOutsideAssist = outsideAssist; 373 geo.fDevOutsideAssist = outsideAssist;
374 geo.fDevInside = inside; 374 geo.fDevInside = inside;
375 geo.fMiterStroke = miterStroke; 375 geo.fMiterStroke = miterStroke;
376 376
377 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); 377 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random));
378 } 378 }
379 379
380 #endif 380 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.h ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698