aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-07-12 11:51:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-13 18:39:23 +0000
commit0088f948177609bc26ac36734f94186ac9e0541d (patch)
tree25ae71b26199401e5ae903a63cde69795ff1a8b6 /src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
parent41ed7f33792c4c32b8444230b8b59cab5e29e45e (diff)
Make GrDrawAtlasOp a non-legacy GrMeshDrawOp
Change-Id: I4d517855dbe3ee6894d7d457e0fc4488f204300c Reviewed-on: https://skia-review.googlesource.com/22542 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp')
-rw-r--r--src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
index 0d32358bc4..0d97de4c57 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
@@ -64,7 +64,7 @@ bool GrSimpleMeshDrawOpHelper::isCompatible(const GrSimpleMeshDrawOpHelper& that
GrDrawOp::RequiresDstTexture GrSimpleMeshDrawOpHelper::xpRequiresDstTexture(
const GrCaps& caps, const GrAppliedClip* clip, GrProcessorAnalysisCoverage geometryCoverage,
- GrColor* color) {
+ GrProcessorAnalysisColor* geometryColor) {
SkDEBUGCODE(fDidAnalysis = true);
GrProcessorSet::Analysis analysis;
if (fProcessors) {
@@ -75,7 +75,12 @@ GrDrawOp::RequiresDstTexture GrSimpleMeshDrawOpHelper::xpRequiresDstTexture(
: GrProcessorAnalysisCoverage::kNone;
}
bool isMixedSamples = this->aaType() == GrAAType::kMixedSamples;
- analysis = fProcessors->finalize(*color, coverage, clip, isMixedSamples, caps, color);
+ GrColor overrideColor;
+ analysis = fProcessors->finalize(*geometryColor, coverage, clip, isMixedSamples, caps,
+ &overrideColor);
+ if (analysis.inputColorIsOverridden()) {
+ *geometryColor = overrideColor;
+ }
} else {
analysis = GrProcessorSet::EmptySetAnalysis();
}
@@ -86,6 +91,15 @@ GrDrawOp::RequiresDstTexture GrSimpleMeshDrawOpHelper::xpRequiresDstTexture(
: GrDrawOp::RequiresDstTexture::kNo;
}
+GrDrawOp::RequiresDstTexture GrSimpleMeshDrawOpHelper::xpRequiresDstTexture(
+ const GrCaps& caps, const GrAppliedClip* clip, GrProcessorAnalysisCoverage geometryCoverage,
+ GrColor* geometryColor) {
+ GrProcessorAnalysisColor color = *geometryColor;
+ auto result = this->xpRequiresDstTexture(caps, clip, geometryCoverage, &color);
+ color.isConstant(geometryColor);
+ return result;
+}
+
SkString GrSimpleMeshDrawOpHelper::dumpInfo() const {
SkString result = this->processors().dumpProcessors();
result.append("AA Type: ");