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

Unified Diff: src/gpu/batches/GrDrawAtlasBatch.cpp

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrDrawBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawAtlasBatch.cpp
diff --git a/src/gpu/batches/GrDrawAtlasBatch.cpp b/src/gpu/batches/GrDrawAtlasBatch.cpp
index 5ecdc1fb032a619b50ec5433428dbd225cc18961..3ee8f88e89455aef111fb53ea86d82fffdea1523 100644
--- a/src/gpu/batches/GrDrawAtlasBatch.cpp
+++ b/src/gpu/batches/GrDrawAtlasBatch.cpp
@@ -12,13 +12,13 @@
#include "SkRandom.h"
#include "SkRSXform.h"
-void GrDrawAtlasBatch::initBatchTracker(const GrPipelineOptimizations& opt) {
+void GrDrawAtlasBatch::initBatchTracker(const GrXPOverridesForBatch& overrides) {
SkASSERT(fGeoData.count() == 1);
// Handle any color overrides
- if (!opt.readsColor()) {
+ if (!overrides.readsColor()) {
fGeoData[0].fColor = GrColor_ILLEGAL;
}
- if (opt.getOverrideColorIfSet(&fGeoData[0].fColor) && fHasColors) {
+ if (overrides.getOverrideColorIfSet(&fGeoData[0].fColor) && fHasColors) {
size_t vertexStride = sizeof(SkPoint) + sizeof(SkPoint) +
(this->hasColors() ? sizeof(GrColor) : 0);
uint8_t* currVertex = fGeoData[0].fVerts.begin();
@@ -29,11 +29,11 @@ void GrDrawAtlasBatch::initBatchTracker(const GrPipelineOptimizations& opt) {
}
// setup batch properties
- fColorIgnored = !opt.readsColor();
+ fColorIgnored = !overrides.readsColor();
fColor = fGeoData[0].fColor;
// We'd like to assert this, but we can't because of GLPrograms test
//SkASSERT(init.readsLocalCoords());
- fCoverageIgnored = !opt.readsCoverage();
+ fCoverageIgnored = !overrides.readsCoverage();
}
static const GrGeometryProcessor* set_vertex_attributes(bool hasColors,
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrDrawBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698