aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureProducer.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-30 13:41:26 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-30 20:06:53 +0000
commit45d6303f6e8403db9499ab28494f672b2bcd034e (patch)
treee3729181fa9bdccbb6fc87f3bf4489d8daba5edd /src/gpu/GrTextureProducer.cpp
parent1b361150239a2ae79979a5bab5c35dfa0c5adb9c (diff)
Have mip status match surface when snapping image from wrapped object
Also fixes some bugs involved with creating mipped SkSurfaces. Bug: skia: Change-Id: I6e0109000eadd2bdee4a907d3ee2231104528165 Reviewed-on: https://skia-review.googlesource.com/65063 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrTextureProducer.cpp')
-rw-r--r--src/gpu/GrTextureProducer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp
index cf7ee7cca7..f5ae0ad565 100644
--- a/src/gpu/GrTextureProducer.cpp
+++ b/src/gpu/GrTextureProducer.cpp
@@ -23,10 +23,11 @@ sk_sp<GrTextureProxy> GrTextureProducer::CopyOnGpu(GrContext* context,
SkASSERT(context);
const SkRect dstRect = SkRect::MakeIWH(copyParams.fWidth, copyParams.fHeight);
+ GrMipMapped mipMapped = dstWillRequireMipMaps ? GrMipMapped::kYes : GrMipMapped::kNo;
sk_sp<GrRenderTargetContext> copyRTC = context->makeDeferredRenderTargetContextWithFallback(
SkBackingFit::kExact, dstRect.width(), dstRect.height(), inputProxy->config(), nullptr,
- 0, dstWillRequireMipMaps, inputProxy->origin());
+ 0, mipMapped, inputProxy->origin());
if (!copyRTC) {
return nullptr;
}