Enable wide color support in CCPR
Unlike other ops, always use half-float colors. The logic around the
Instance struct makes dynamically switching color size tricky.
CCPR stores color in a per-instance attribute though, so the cost of
always using FP16 is much lower.
Bug: skia:
Change-Id: I9c0c64940f74f915a18417a5830030558e065d28
Reviewed-on: https://skia-review.googlesource.com/c/182760
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ccpr/GrCCPathCache.h b/src/gpu/ccpr/GrCCPathCache.h
index 5fa5d4d..688521b 100644
--- a/src/gpu/ccpr/GrCCPathCache.h
+++ b/src/gpu/ccpr/GrCCPathCache.h
@@ -268,7 +268,7 @@
friend class GrCCPathCache;
friend void GrCCPathProcessor::Instance::set(const GrCCPathCacheEntry&, const SkIVector&,
- GrColor, DoEvenOddFill); // To access data.
+ uint64_t color, DoEvenOddFill); // To access data.
public:
int testingOnly_peekOnFlushRefCnt() const;
@@ -360,7 +360,7 @@
}
inline void GrCCPathProcessor::Instance::set(const GrCCPathCacheEntry& entry,
- const SkIVector& shift, GrColor color,
+ const SkIVector& shift, uint64_t color,
DoEvenOddFill doEvenOddFill) {
float dx = (float)shift.fX, dy = (float)shift.fY;
this->set(entry.fDevBounds.makeOffset(dx, dy), MakeOffset45(entry.fDevBounds45, dx, dy),