Make GrColorSpaceInfo store GrColorType.
This is largely redundant with GrPixelConfig. However, we intend to
remove GrPixelConfig.
Bug: skia:7580
Change-Id: I03d92303be832711f7821f8a97d36387c9b04a9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222883
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp
index 34aac30..c299fed 100644
--- a/src/gpu/GrTextureAdjuster.cpp
+++ b/src/gpu/GrTextureAdjuster.cpp
@@ -15,12 +15,17 @@
GrTextureAdjuster::GrTextureAdjuster(GrRecordingContext* context,
sk_sp<GrTextureProxy> original,
+ GrColorType colorType,
SkAlphaType alphaType,
uint32_t uniqueID,
SkColorSpace* cs,
bool useDecal)
: INHERITED(context, original->width(), original->height(),
- GrColorSpaceInfo(alphaType, sk_ref_sp(cs), original->config()), useDecal)
+ GrColorSpaceInfo(colorType,
+ alphaType,
+ sk_ref_sp(cs),
+ original->config()),
+ useDecal)
, fOriginal(std::move(original))
, fUniqueID(uniqueID) {}
@@ -52,7 +57,7 @@
sk_sp<GrTextureProxy> proxy = this->originalProxyRef();
- sk_sp<GrTextureProxy> copy = CopyOnGpu(this->context(), std::move(proxy),
+ sk_sp<GrTextureProxy> copy = CopyOnGpu(this->context(), std::move(proxy), this->colorType(),
copyParams, willBeMipped);
if (copy) {
if (key.isValid()) {