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

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

Issue 1301663002: Privatize GrBatch subclass overrides (Closed) Base URL: https://skia.googlesource.com/skia.git@drawsonvb
Patch Set: more 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/GrBWFillRectBatch.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 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 "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 25 matching lines...) Expand all
36 coverageType = Coverage::kSolid_Type; 36 coverageType = Coverage::kSolid_Type;
37 } else { 37 } else {
38 coverageType = Coverage::kAttribute_Type; 38 coverageType = Coverage::kAttribute_Type;
39 } 39 }
40 Coverage coverage(coverageType); 40 Coverage coverage(coverageType);
41 LocalCoords localCoords(usesLocalCoords ? LocalCoords::kUsePosition_Type : 41 LocalCoords localCoords(usesLocalCoords ? LocalCoords::kUsePosition_Type :
42 LocalCoords::kUnused_Type); 42 LocalCoords::kUnused_Type);
43 return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix); 43 return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix);
44 } 44 }
45 45
46
47 void GrAAStrokeRectBatch::initBatchTracker(const GrPipelineOptimizations& opt) { 46 void GrAAStrokeRectBatch::initBatchTracker(const GrPipelineOptimizations& opt) {
48 // Handle any color overrides 47 // Handle any color overrides
49 if (!opt.readsColor()) { 48 if (!opt.readsColor()) {
50 fGeoData[0].fColor = GrColor_ILLEGAL; 49 fGeoData[0].fColor = GrColor_ILLEGAL;
51 } 50 }
52 opt.getOverrideColorIfSet(&fGeoData[0].fColor); 51 opt.getOverrideColorIfSet(&fGeoData[0].fColor);
53 52
54 // setup batch properties 53 // setup batch properties
55 fBatch.fColorIgnored = !opt.readsColor(); 54 fBatch.fColorIgnored = !opt.readsColor();
56 fBatch.fColor = fGeoData[0].fColor; 55 fBatch.fColor = fGeoData[0].fColor;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 geo.fColor = GrRandomColor(random); 372 geo.fColor = GrRandomColor(random);
374 geo.fDevOutside = outside; 373 geo.fDevOutside = outside;
375 geo.fDevOutsideAssist = outsideAssist; 374 geo.fDevOutsideAssist = outsideAssist;
376 geo.fDevInside = inside; 375 geo.fDevInside = inside;
377 geo.fMiterStroke = miterStroke; 376 geo.fMiterStroke = miterStroke;
378 377
379 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); 378 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random));
380 } 379 }
381 380
382 #endif 381 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.h ('k') | src/gpu/batches/GrBWFillRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698