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

Side by Side Diff: src/gpu/batches/GrDrawAtlasBatch.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/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrDrawVerticesBatch.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 "GrDrawAtlasBatch.h" 8 #include "GrDrawAtlasBatch.h"
9 #include "GrBatchTest.h" 9 #include "GrBatchTest.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
11 11
12 void GrDrawAtlasBatch::initBatchTracker(const GrPipelineInfo& init) { 12 void GrDrawAtlasBatch::initBatchTracker(const GrPipelineOptimizations& opt) {
13 // Handle any color overrides 13 // Handle any color overrides
14 if (!init.readsColor()) { 14 if (!opt.readsColor()) {
15 fGeoData[0].fColor = GrColor_ILLEGAL; 15 fGeoData[0].fColor = GrColor_ILLEGAL;
16 } 16 }
17 init.getOverrideColorIfSet(&fGeoData[0].fColor); 17 opt.getOverrideColorIfSet(&fGeoData[0].fColor);
18 18
19 // setup batch properties 19 // setup batch properties
20 fColorIgnored = !init.readsColor(); 20 fColorIgnored = !opt.readsColor();
21 fColor = fGeoData[0].fColor; 21 fColor = fGeoData[0].fColor;
22 // We'd like to assert this, but we can't because of GLPrograms test 22 // We'd like to assert this, but we can't because of GLPrograms test
23 //SkASSERT(init.readsLocalCoords()); 23 //SkASSERT(init.readsLocalCoords());
24 fCoverageIgnored = !init.readsCoverage(); 24 fCoverageIgnored = !opt.readsCoverage();
25 } 25 }
26 26
27 static const GrGeometryProcessor* set_vertex_attributes(bool hasLocalCoords, 27 static const GrGeometryProcessor* set_vertex_attributes(bool hasLocalCoords,
28 bool hasColors, 28 bool hasColors,
29 int* colorOffset, 29 int* colorOffset,
30 int* texOffset, 30 int* texOffset,
31 GrColor color, 31 GrColor color,
32 const SkMatrix& viewMatr ix, 32 const SkMatrix& viewMatr ix,
33 bool coverageIgnored) { 33 bool coverageIgnored) {
34 using namespace GrDefaultGeoProcFactory; 34 using namespace GrDefaultGeoProcFactory;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 GrDrawAtlasBatch::Geometry geometry; 203 GrDrawAtlasBatch::Geometry geometry;
204 geometry.fColor = GrRandomColor(random); 204 geometry.fColor = GrRandomColor(random);
205 return GrDrawAtlasBatch::Create(geometry, viewMatrix, 205 return GrDrawAtlasBatch::Create(geometry, viewMatrix,
206 positions.begin(), vertexCount, 206 positions.begin(), vertexCount,
207 colors.begin(), 207 colors.begin(),
208 texCoords.begin(), 208 texCoords.begin(),
209 bounds); 209 bounds);
210 } 210 }
211 211
212 #endif 212 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrDrawVerticesBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698