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

Unified Diff: src/gpu/effects/GrBezierEffect.h

Issue 1132323003: Revert of Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: Created 5 years, 7 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/GrTestBatch.h ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBezierEffect.h
diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h
index 7700c58fe6937c0e711c674eccc937bd7241bc18..f1b22fa8a4c9c1e5ddd396e882d10fb3deddc764 100644
--- a/src/gpu/effects/GrBezierEffect.h
+++ b/src/gpu/effects/GrBezierEffect.h
@@ -63,7 +63,6 @@
const GrPrimitiveEdgeType edgeType,
const GrDrawTargetCaps& caps,
const SkMatrix& localMatrix,
- bool usesLocalCoords,
uint8_t coverage = 0xff) {
switch (edgeType) {
case kFillAA_GrProcessorEdgeType:
@@ -72,18 +71,18 @@
}
return SkNEW_ARGS(GrConicEffect, (color, viewMatrix, coverage,
kFillAA_GrProcessorEdgeType,
- localMatrix, usesLocalCoords));
+ localMatrix));
case kHairlineAA_GrProcessorEdgeType:
if (!caps.shaderCaps()->shaderDerivativeSupport()) {
return NULL;
}
return SkNEW_ARGS(GrConicEffect, (color, viewMatrix, coverage,
kHairlineAA_GrProcessorEdgeType,
- localMatrix, usesLocalCoords));
+ localMatrix));
case kFillBW_GrProcessorEdgeType:
return SkNEW_ARGS(GrConicEffect, (color, viewMatrix, coverage,
kFillBW_GrProcessorEdgeType,
- localMatrix, usesLocalCoords));
+ localMatrix));
default:
return NULL;
}
@@ -99,11 +98,8 @@
inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType); }
inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; }
GrColor color() const { return fColor; }
- bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
- bool usesLocalCoords() const { return fUsesLocalCoords; }
- uint8_t coverageScale() const { return fCoverageScale; }
virtual void getGLProcessorKey(const GrBatchTracker& bt,
const GrGLSLCaps& caps,
@@ -112,14 +108,15 @@
virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt,
const GrGLSLCaps&) const override;
+ void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override;
+
private:
GrConicEffect(GrColor, const SkMatrix& viewMatrix, uint8_t coverage, GrPrimitiveEdgeType,
- const SkMatrix& localMatrix, bool usesLocalCoords);
+ const SkMatrix& localMatrix);
GrColor fColor;
SkMatrix fViewMatrix;
SkMatrix fLocalMatrix;
- bool fUsesLocalCoords;
uint8_t fCoverageScale;
GrPrimitiveEdgeType fEdgeType;
const Attribute* fInPosition;
@@ -148,7 +145,6 @@
const GrPrimitiveEdgeType edgeType,
const GrDrawTargetCaps& caps,
const SkMatrix& localMatrix,
- bool usesLocalCoords,
uint8_t coverage = 0xff) {
switch (edgeType) {
case kFillAA_GrProcessorEdgeType:
@@ -157,18 +153,18 @@
}
return SkNEW_ARGS(GrQuadEffect, (color, viewMatrix, coverage,
kFillAA_GrProcessorEdgeType,
- localMatrix, usesLocalCoords));
+ localMatrix));
case kHairlineAA_GrProcessorEdgeType:
if (!caps.shaderCaps()->shaderDerivativeSupport()) {
return NULL;
}
return SkNEW_ARGS(GrQuadEffect, (color, viewMatrix, coverage,
kHairlineAA_GrProcessorEdgeType,
- localMatrix, usesLocalCoords));
+ localMatrix));
case kFillBW_GrProcessorEdgeType:
return SkNEW_ARGS(GrQuadEffect, (color, viewMatrix, coverage,
kFillBW_GrProcessorEdgeType,
- localMatrix, usesLocalCoords));
+ localMatrix));
default:
return NULL;
}
@@ -184,11 +180,8 @@
inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType); }
inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; }
GrColor color() const { return fColor; }
- bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
const SkMatrix& localMatrix() const { return fLocalMatrix; }
- bool usesLocalCoords() const { return fUsesLocalCoords; }
- uint8_t coverageScale() const { return fCoverageScale; }
virtual void getGLProcessorKey(const GrBatchTracker& bt,
const GrGLSLCaps& caps,
@@ -197,14 +190,15 @@
virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt,
const GrGLSLCaps&) const override;
+ void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override;
+
private:
GrQuadEffect(GrColor, const SkMatrix& viewMatrix, uint8_t coverage, GrPrimitiveEdgeType,
- const SkMatrix& localMatrix, bool usesLocalCoords);
+ const SkMatrix& localMatrix);
GrColor fColor;
SkMatrix fViewMatrix;
SkMatrix fLocalMatrix;
- bool fUsesLocalCoords;
uint8_t fCoverageScale;
GrPrimitiveEdgeType fEdgeType;
const Attribute* fInPosition;
@@ -264,7 +258,6 @@
inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType); }
inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; }
GrColor color() const { return fColor; }
- bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
virtual void getGLProcessorKey(const GrBatchTracker& bt,
@@ -273,6 +266,8 @@
virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt,
const GrGLSLCaps&) const override;
+
+ void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override;
private:
GrCubicEffect(GrColor, const SkMatrix& viewMatrix, GrPrimitiveEdgeType);
« no previous file with comments | « src/gpu/GrTestBatch.h ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698