aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrXferProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-02-10 14:29:38 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-10 20:02:32 +0000
commiteec6f7be5461e588210f383b8af18f324a2bdb46 (patch)
tree1d72e2d8636f65b32e0edaa4a47fe3fa6d6c3b05 /src/gpu/GrXferProcessor.cpp
parent2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc (diff)
Use new fragment processor optimization queries.
This doesn't yet delete the old virtuals. It still uses the color and component flags model for the pipeline input and blended output but I'm planning to change those as well. Change-Id: I64e2ec0fe9ed9fae3aabf1ca8c9bc0582fc7565a Reviewed-on: https://skia-review.googlesource.com/7760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrXferProcessor.cpp')
-rw-r--r--src/gpu/GrXferProcessor.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index df1f35eafe..9e7948c415 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -185,12 +185,10 @@ using ColorType = GrXPFactory::ColorType;
using CoverageType = GrXPFactory::CoverageType;
ColorType analysis_color_type(const GrPipelineAnalysis& analysis) {
- if (analysis.fColorPOI.validFlags() == kRGBA_GrColorComponentFlags) {
- return GrColorIsOpaque(analysis.fColorPOI.color()) ? ColorType::kOpaqueConstant
- : ColorType::kConstant;
+ if (analysis.fColorPOI.hasKnownOutputColor()) {
+ return analysis.fColorPOI.isOpaque() ? ColorType::kOpaqueConstant : ColorType::kConstant;
}
- if ((analysis.fColorPOI.validFlags() & kA_GrColorComponentFlag) &&
- GrColorIsOpaque(analysis.fColorPOI.color())) {
+ if (analysis.fColorPOI.isOpaque()) {
return ColorType::kOpaque;
}
return ColorType::kUnknown;