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

Unified Diff: src/gpu/GrPipeline.cpp

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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
Index: src/gpu/GrPipeline.cpp
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 73b20a9042065f3d99b4b1cc67f8131fb6286329..61925a47b50bdf12f090df8c4144706c9da033ea 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -17,7 +17,7 @@
#include "batches/GrBatch.h"
GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args,
- GrPipelineOptimizations* opts) {
+ GrXPOverridesForBatch* overrides) {
const GrPipelineBuilder& builder = *args.fPipelineBuilder;
// Create XferProcessor from DS's XPFactory
@@ -117,22 +117,22 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args,
}
// Setup info we need to pass to GrPrimitiveProcessors that are used with this GrPipeline.
- opts->fFlags = 0;
+ overrides->fFlags = 0;
if (!SkToBool(optFlags & GrXferProcessor::kIgnoreColor_OptFlag)) {
- opts->fFlags |= GrPipelineOptimizations::kReadsColor_Flag;
+ overrides->fFlags |= GrXPOverridesForBatch::kReadsColor_Flag;
}
if (GrColor_ILLEGAL != overrideColor) {
- opts->fFlags |= GrPipelineOptimizations::kUseOverrideColor_Flag;
- opts->fOverrideColor = overrideColor;
+ overrides->fFlags |= GrXPOverridesForBatch::kUseOverrideColor_Flag;
+ overrides->fOverrideColor = overrideColor;
}
if (!SkToBool(optFlags & GrXferProcessor::kIgnoreCoverage_OptFlag)) {
- opts->fFlags |= GrPipelineOptimizations::kReadsCoverage_Flag;
+ overrides->fFlags |= GrXPOverridesForBatch::kReadsCoverage_Flag;
}
if (usesLocalCoords) {
- opts->fFlags |= GrPipelineOptimizations::kReadsLocalCoords_Flag;
+ overrides->fFlags |= GrXPOverridesForBatch::kReadsLocalCoords_Flag;
}
if (SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag)) {
- opts->fFlags |= GrPipelineOptimizations::kCanTweakAlphaForCoverage_Flag;
+ overrides->fFlags |= GrXPOverridesForBatch::kCanTweakAlphaForCoverage_Flag;
}
GrXPFactory::InvariantBlendedColor blendedColor;
@@ -145,7 +145,7 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args,
&blendedColor);
}
if (blendedColor.fWillBlendWithDst) {
- opts->fFlags |= GrPipelineOptimizations::kWillColorBlendWithDst_Flag;
+ overrides->fFlags |= GrXPOverridesForBatch::kWillColorBlendWithDst_Flag;
}
return pipeline;

Powered by Google App Engine
This is Rietveld 408576698