Remove unique_ptr_address_as_pointer_address
std::unique_ptr is not always the same size as a pointer (shame! shame!).
AFAICT I added this terrible hack just to be able to make GrProcessorSet
store unique_ptrs of const GrFP rather than non-const FP, which is in no
way important.
Bug: skia:9908
Change-Id: I6e7eb0c0a7ad3473489e549909fa0b0a9eeec49b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270938
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp
index 054866b..fe64cb9 100644
--- a/src/gpu/GrProcessorSet.cpp
+++ b/src/gpu/GrProcessorSet.cpp
@@ -171,10 +171,9 @@
GrProcessorSet::Analysis analysis;
analysis.fCompatibleWithCoverageAsAlpha = GrProcessorAnalysisCoverage::kLCD != coverageInput;
- const std::unique_ptr<const GrFragmentProcessor>* fps =
+ const std::unique_ptr<GrFragmentProcessor>* fps =
fFragmentProcessors.get() + fFragmentProcessorOffset;
- GrColorFragmentProcessorAnalysis colorAnalysis(
- colorInput, unique_ptr_address_as_pointer_address(fps), fColorFragmentProcessorCnt);
+ GrColorFragmentProcessorAnalysis colorAnalysis(colorInput, fps, fColorFragmentProcessorCnt);
fps += fColorFragmentProcessorCnt;
int n = this->numCoverageFragmentProcessors();
bool hasCoverageFP = n > 0;