Index: src/gpu/GrTextureParamsAdjuster.cpp |
diff --git a/src/gpu/GrTextureParamsAdjuster.cpp b/src/gpu/GrTextureParamsAdjuster.cpp |
index 68a6f9907041abe8fc62ad54dc2b91bb9371aeb2..36bf20642e2071340f72eb3b984d484276477398 100644 |
--- a/src/gpu/GrTextureParamsAdjuster.cpp |
+++ b/src/gpu/GrTextureParamsAdjuster.cpp |
@@ -33,33 +33,9 @@ static GrTexture* copy_on_gpu(GrTexture* inputTexture, const SkIRect* subset, |
SkASSERT(!subset || !subset->isEmpty()); |
GrContext* context = inputTexture->getContext(); |
SkASSERT(context); |
- const GrCaps* caps = context->caps(); |
GrPixelConfig config = GrMakePixelConfigUncompressed(inputTexture->config()); |
- // If the config isn't renderable try converting to either A8 or an 32 bit config. Otherwise, |
- // fail. |
- if (!caps->isConfigRenderable(config, false)) { |
- if (GrPixelConfigIsAlphaOnly(config)) { |
- if (caps->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) { |
- config = kAlpha_8_GrPixelConfig; |
- } else if (caps->isConfigRenderable(kSkia8888_GrPixelConfig, false)) { |
- config = kSkia8888_GrPixelConfig; |
- } else { |
- return nullptr; |
- } |
- } else if (kRGB_GrColorComponentFlags == |
- (kRGB_GrColorComponentFlags & GrPixelConfigComponentMask(config))) { |
- if (caps->isConfigRenderable(kSkia8888_GrPixelConfig, false)) { |
- config = kSkia8888_GrPixelConfig; |
- } else { |
- return nullptr; |
- } |
- } else { |
- return nullptr; |
- } |
- } |
- |
sk_sp<GrDrawContext> copyDC = context->makeDrawContext(SkBackingFit::kExact, copyParams.fWidth, |
copyParams.fHeight, config, nullptr); |
if (!copyDC) { |