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/GrOnFlushResourceProvider.cpp b/src/gpu/GrOnFlushResourceProvider.cpp
index 0b607aa..ab5dcc9 100644
--- a/src/gpu/GrOnFlushResourceProvider.cpp
+++ b/src/gpu/GrOnFlushResourceProvider.cpp
@@ -16,9 +16,10 @@
#include "src/gpu/GrSurfaceProxy.h"
sk_sp<GrRenderTargetContext> GrOnFlushResourceProvider::makeRenderTargetContext(
- sk_sp<GrSurfaceProxy> proxy,
- sk_sp<SkColorSpace> colorSpace,
- const SkSurfaceProps* props) {
+ sk_sp<GrSurfaceProxy> proxy,
+ GrColorType colorType,
+ sk_sp<SkColorSpace> colorSpace,
+ const SkSurfaceProps* props) {
// Since this is at flush time and these won't be allocated for us by the GrResourceAllocator
// we have to manually ensure it is allocated here. The proxy had best have been created
// with the kNoPendingIO flag!
@@ -26,10 +27,8 @@
return nullptr;
}
- sk_sp<GrRenderTargetContext> renderTargetContext(
- fDrawingMgr->makeRenderTargetContext(std::move(proxy),
- std::move(colorSpace),
- props, false));
+ sk_sp<GrRenderTargetContext> renderTargetContext(fDrawingMgr->makeRenderTargetContext(
+ std::move(proxy), colorType, std::move(colorSpace), props, false));
if (!renderTargetContext) {
return nullptr;