diff options
author | 2017-09-25 12:26:58 -0400 | |
---|---|---|
committer | 2017-09-26 15:17:07 +0000 | |
commit | 90f28ec3da530d1720a0a74283a44cfd9c207126 (patch) | |
tree | d5fe69551fcc9e9047d896f73adeeb6c7be09d3f /src/gpu/GrBackendTextureImageGenerator.cpp | |
parent | 4c9842ec4b2df1b937147c14288e88f0ae13a556 (diff) |
Add some asserts and explict setting of fIsMipMapped
Part 2 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083
Bug: skia:
Change-Id: Iddc2571d88486531c76ab47432c2a51f2ac79043
Reviewed-on: https://skia-review.googlesource.com/44463
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrBackendTextureImageGenerator.cpp')
-rw-r--r-- | src/gpu/GrBackendTextureImageGenerator.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp index 712ebb8bb1..ef391c8f0c 100644 --- a/src/gpu/GrBackendTextureImageGenerator.cpp +++ b/src/gpu/GrBackendTextureImageGenerator.cpp @@ -182,7 +182,11 @@ sk_sp<GrTextureProxy> GrBackendTextureImageGenerator::onGenerateTexture( desc.fWidth = info.width(); desc.fHeight = info.height(); desc.fConfig = proxy->config(); - desc.fIsMipMapped = proxy->isMipMapped(); + // TODO: We should support the case where we can allocate the mips ahead of time then copy + // the subregion into the base layer and then let the GPU generate the rest of the mip + // levels. + SkASSERT(!proxy->isMipMapped()); + desc.fIsMipMapped = false; sk_sp<GrSurfaceContext> sContext(context->contextPriv().makeDeferredSurfaceContext( desc, SkBackingFit::kExact, SkBudgeted::kYes)); |