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

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

Issue 2106283003: Remove unused batch rect append functions (Closed) Base URL: https://chromium.googlesource.com/skia.git@rectgeoms
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.h ('k') | src/gpu/batches/GrNonAAFillRectBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAFillRectBatch.cpp
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index b2a3de9ee8da06b84d43c6e2c830d73dc63130ff..cba91c67e64891ef2f97793277e4a4e041054786 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -526,27 +526,6 @@ private:
typedef GrVertexBatch INHERITED;
};
-inline static void append_to_batch(AAFillRectNoLocalMatrixBatch* batch, GrColor color,
- const SkMatrix& viewMatrix, const SkRect& rect,
- const SkRect& devRect) {
- AAFillRectNoLocalMatrixBatch::Geometry& geo = batch->geoData()->push_back();
- geo.fColor = color;
- geo.fViewMatrix = viewMatrix;
- geo.fRect = rect;
- geo.fDevRect = devRect;
-}
-
-inline static void append_to_batch(AAFillRectLocalMatrixBatch* batch, GrColor color,
- const SkMatrix& viewMatrix, const SkMatrix& localMatrix,
- const SkRect& rect, const SkRect& devRect) {
- AAFillRectLocalMatrixBatch::Geometry& geo = batch->geoData()->push_back();
- geo.fColor = color;
- geo.fViewMatrix = viewMatrix;
- geo.fLocalMatrix = localMatrix;
- geo.fRect = rect;
- geo.fDevRect = devRect;
-}
-
namespace GrAAFillRectBatch {
GrDrawBatch* Create(GrColor color,
@@ -554,7 +533,11 @@ GrDrawBatch* Create(GrColor color,
const SkRect& rect,
const SkRect& devRect) {
AAFillRectNoLocalMatrixBatch* batch = AAFillRectNoLocalMatrixBatch::Create();
- append_to_batch(batch, color, viewMatrix, rect, devRect);
+ AAFillRectNoLocalMatrixBatch::Geometry& geo = batch->geoData()->push_back();
+ geo.fColor = color;
+ geo.fViewMatrix = viewMatrix;
+ geo.fRect = rect;
+ geo.fDevRect = devRect;
batch->init();
return batch;
}
@@ -565,7 +548,12 @@ GrDrawBatch* Create(GrColor color,
const SkRect& rect,
const SkRect& devRect) {
AAFillRectLocalMatrixBatch* batch = AAFillRectLocalMatrixBatch::Create();
- append_to_batch(batch, color, viewMatrix, localMatrix, rect, devRect);
+ AAFillRectLocalMatrixBatch::Geometry& geo = batch->geoData()->push_back();
+ geo.fColor = color;
+ geo.fViewMatrix = viewMatrix;
+ geo.fLocalMatrix = localMatrix;
+ geo.fRect = rect;
+ geo.fDevRect = devRect;
batch->init();
return batch;
}
@@ -592,27 +580,6 @@ GrDrawBatch* CreateWithLocalRect(GrColor color,
return Create(color, viewMatrix, localMatrix, rect, devRect);
}
-void Append(GrBatch* origBatch,
- GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect& rect,
- const SkRect& devRect) {
- AAFillRectNoLocalMatrixBatch* batch = origBatch->cast<AAFillRectNoLocalMatrixBatch>();
- append_to_batch(batch, color, viewMatrix, rect, devRect);
- batch->updateBoundsAfterAppend();
-}
-
-void Append(GrBatch* origBatch,
- GrColor color,
- const SkMatrix& viewMatrix,
- const SkMatrix& localMatrix,
- const SkRect& rect,
- const SkRect& devRect) {
- AAFillRectLocalMatrixBatch* batch = origBatch->cast<AAFillRectLocalMatrixBatch>();
- append_to_batch(batch, color, viewMatrix, localMatrix, rect, devRect);
- batch->updateBoundsAfterAppend();
-}
-
};
///////////////////////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.h ('k') | src/gpu/batches/GrNonAAFillRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698