Revert "Remove gpu config fallback in onMakeColorTypeAndColorSpace."

This reverts commit 1fb0874af5.

Reason for revert: maybe breaking chrome roll.

Original change's description:
> Remove gpu config fallback in onMakeColorTypeAndColorSpace.
> 
> If the client is asking for a specific colorType for a GPU image it seems
> wrong to give them one they didn't ask for.
> 
> Change-Id: I65bcdfcb0f744458e2162fe266c08bd3c8fb5a85
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222176
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com

Change-Id: If3469e45d03471af126605072f4d6debec7101b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222038
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Greg Daniel 2019-06-19 20:46:27 +00:00 committed by Skia Commit-Bot
parent 024a912136
commit 46e61805c3

View File

@ -92,7 +92,7 @@ sk_sp<SkImage> SkImage_Gpu::onMakeColorTypeAndColorSpace(GrRecordingContext* con
}
sk_sp<GrRenderTargetContext> renderTargetContext(
context->priv().makeDeferredRenderTargetContext(
context->priv().makeDeferredRenderTargetContextWithFallback(
format, SkBackingFit::kExact, this->width(), this->height(),
SkColorType2GrPixelConfig(targetCT), nullptr));
if (!renderTargetContext) {