aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r--src/gpu/SkGr.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 8035027732..0c065f9c74 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -219,29 +219,13 @@ sk_sp<GrTextureProxy> GrGenerateMipMapsAndUploadToTextureProxy(GrContext* ctx,
}
sk_sp<GrTextureProxy> GrCopyBaseMipMapToTextureProxy(GrContext* ctx,
- GrTextureProxy* baseProxy,
- SkColorSpace* dstColorSpace) {
+ GrTextureProxy* baseProxy) {
SkASSERT(baseProxy);
if (!ctx->caps()->isConfigCopyable(baseProxy->config())) {
return nullptr;
}
- SkDestinationSurfaceColorMode colorMode = dstColorSpace
- ? SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware
- : SkDestinationSurfaceColorMode::kLegacy;
-
- // SkMipMap doesn't include the base level in the level count so we have to add 1
- int mipLevelCount = SkMipMap::ComputeLevelCount(baseProxy->width(), baseProxy->height()) + 1;
-
- std::unique_ptr<GrMipLevel[]> texels(new GrMipLevel[mipLevelCount]);
-
- // We don't want to upload any texel data
- for (int i = 0; i < mipLevelCount; i++) {
- texels[i].fPixels = nullptr;
- texels[i].fRowBytes = 0;
- }
-
GrSurfaceDesc desc;
desc.fFlags = kNone_GrSurfaceFlags;
desc.fOrigin = baseProxy->origin();
@@ -252,8 +236,7 @@ sk_sp<GrTextureProxy> GrCopyBaseMipMapToTextureProxy(GrContext* ctx,
sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeDeferredMipMap(ctx->resourceProvider(),
desc,
- SkBudgeted::kYes, texels.get(),
- mipLevelCount, colorMode);
+ SkBudgeted::kYes);
if (!proxy) {
return nullptr;
}