aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGeometryProcessor.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-05-19 08:23:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-19 08:23:30 -0700
commitb8c241ad099f3f0c2cbf3e7c10f5f6207175d490 (patch)
tree5d5595ba1d6472261af05b0e698cda2160834033 /src/gpu/GrGeometryProcessor.h
parentd3a560fa80bfb3e2d2e989f951bb3b1c52316654 (diff)
Preliminary attempt to remove batch tracker
Diffstat (limited to 'src/gpu/GrGeometryProcessor.h')
-rw-r--r--src/gpu/GrGeometryProcessor.h32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index eee286b20d..9c55359af5 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -26,6 +26,9 @@ public:
bool willUseGeoShader() const { return fWillUseGeoShader; }
+ // TODO delete when paths are in batch
+ void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override {}
+
// TODO delete this when paths are in batch
bool canMakeEqual(const GrBatchTracker& mine,
const GrPrimitiveProcessor& that,
@@ -43,35 +46,6 @@ public:
}
protected:
- /*
- * An optional simple helper function to determine by what means the GrGeometryProcessor should
- * use to provide color. If we are given an override color(ie the given overridecolor is NOT
- * GrColor_ILLEGAL) then we must always emit that color(currently overrides are only supported
- * via uniform, but with deferred Geometry we could use attributes). Otherwise, if our color is
- * ignored then we should not emit a color. Lastly, if we don't have vertex colors then we must
- * emit a color via uniform
- * TODO this function changes quite a bit with deferred geometry. There the GrGeometryProcessor
- * can upload a new color via attribute if needed.
- */
- static GrGPInput GetColorInputType(GrColor* color, GrColor primitiveColor,
- const GrPipelineInfo& init,
- bool hasVertexColor) {
- if (init.fColorIgnored) {
- *color = GrColor_ILLEGAL;
- return kIgnored_GrGPInput;
- } else if (GrColor_ILLEGAL != init.fOverrideColor) {
- *color = init.fOverrideColor;
- return kUniform_GrGPInput;
- }
-
- *color = primitiveColor;
- if (hasVertexColor) {
- return kAttribute_GrGPInput;
- } else {
- return kUniform_GrGPInput;
- }
- }
-
/**
* Subclasses call this from their constructor to register vertex attributes. Attributes
* will be padded to the nearest 4 bytes for performance reasons.