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

Unified Diff: src/gpu/batches/GrNonAAFillRectBatch.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/GrNinePatch.cpp ('k') | src/gpu/batches/GrNonAAStrokeRectBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrNonAAFillRectBatch.cpp
diff --git a/src/gpu/batches/GrNonAAFillRectBatch.cpp b/src/gpu/batches/GrNonAAFillRectBatch.cpp
index 5f37741b4647fa4e9d460dcd3f6c4759d678fd26..09643444d08314df981df6fc6fd1fa6ea53bf52f 100644
--- a/src/gpu/batches/GrNonAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrNonAAFillRectBatch.cpp
@@ -134,13 +134,13 @@ public:
}
static bool CanCombine(const Geometry& mine, const Geometry& theirs,
- const GrPipelineOptimizations& opts) {
+ const GrXPOverridesForBatch& overrides) {
return true;
}
static const GrGeometryProcessor* CreateGP(const Geometry& geo,
- const GrPipelineOptimizations& opts) {
- const GrGeometryProcessor* gp = create_gp(geo.fViewMatrix, opts.readsCoverage(), true,
+ const GrXPOverridesForBatch& overrides) {
+ const GrGeometryProcessor* gp = create_gp(geo.fViewMatrix, overrides.readsCoverage(), true,
nullptr);
SkASSERT(gp->getVertexStride() ==
@@ -149,7 +149,7 @@ public:
}
static void Tesselate(intptr_t vertices, size_t vertexStride, const Geometry& geo,
- const GrPipelineOptimizations& opts) {
+ const GrXPOverridesForBatch& overrides) {
tesselate(vertices, vertexStride, geo.fColor, geo.fViewMatrix, geo.fRect, &geo.fLocalQuad);
}
};
@@ -179,7 +179,7 @@ public:
}
static bool CanCombine(const Geometry& mine, const Geometry& theirs,
- const GrPipelineOptimizations& opts) {
+ const GrXPOverridesForBatch& overrides) {
// We could batch across perspective vm changes if we really wanted to
return mine.fViewMatrix.cheapEqualTo(theirs.fViewMatrix) &&
mine.fHasLocalRect == theirs.fHasLocalRect &&
@@ -187,8 +187,8 @@ public:
}
static const GrGeometryProcessor* CreateGP(const Geometry& geo,
- const GrPipelineOptimizations& opts) {
- const GrGeometryProcessor* gp = create_gp(geo.fViewMatrix, opts.readsCoverage(),
+ const GrXPOverridesForBatch& overrides) {
+ const GrGeometryProcessor* gp = create_gp(geo.fViewMatrix, overrides.readsCoverage(),
geo.fHasLocalRect,
geo.fHasLocalMatrix ? &geo.fLocalMatrix :
nullptr);
@@ -200,7 +200,7 @@ public:
}
static void Tesselate(intptr_t vertices, size_t vertexStride, const Geometry& geo,
- const GrPipelineOptimizations& opts) {
+ const GrXPOverridesForBatch& overrides) {
if (geo.fHasLocalRect) {
GrQuad quad(geo.fLocalRect);
tesselate(vertices, vertexStride, geo.fColor, geo.fViewMatrix, geo.fRect, &quad);
« no previous file with comments | « src/gpu/batches/GrNinePatch.cpp ('k') | src/gpu/batches/GrNonAAStrokeRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698