GPU clear values: just 4 floats
We previously represented these as SkPMColor4f. However, upcoming
changes will add limited support for clearing/drawing to unpremul
dst. Just store the clear values as four floats without assigned
interpretation.
Also, noticed a bug by code inspection: we weren't accounting for
write view swizzle in GrRTC. Fixed and added gm to test.
Bug: skia:11019
Change-Id: I1bce1f6c97a156c0377ebad1b166eb641362b67a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340098
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrOpsRenderPass.cpp b/src/gpu/GrOpsRenderPass.cpp
index 4dde2cc..c22ae3f 100644
--- a/src/gpu/GrOpsRenderPass.cpp
+++ b/src/gpu/GrOpsRenderPass.cpp
@@ -35,7 +35,7 @@
this->resetActiveBuffers();
}
-void GrOpsRenderPass::clear(const GrScissorState& scissor, const SkPMColor4f& color) {
+void GrOpsRenderPass::clear(const GrScissorState& scissor, std::array<float, 4> color) {
SkASSERT(fRenderTarget);
// A clear at this level will always be a true clear, so make sure clears were not supposed to
// be redirected to draws instead