aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlTexture.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/mtl/GrMtlTexture.mm')
-rw-r--r--src/gpu/mtl/GrMtlTexture.mm11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/mtl/GrMtlTexture.mm b/src/gpu/mtl/GrMtlTexture.mm
index cdc9b0c195..d66f2ba6be 100644
--- a/src/gpu/mtl/GrMtlTexture.mm
+++ b/src/gpu/mtl/GrMtlTexture.mm
@@ -12,7 +12,8 @@
#include "GrTexturePriv.h"
sk_sp<GrMtlTexture> GrMtlTexture::CreateNewTexture(GrMtlGpu* gpu, SkBudgeted budgeted,
- const GrSurfaceDesc& desc, int mipLevels) {
+ const GrSurfaceDesc& desc, int mipLevels,
+ bool wasFullMipMapDataProvided) {
MTLPixelFormat format;
if (!GrPixelConfigToMTLFormat(desc.fConfig, &format)) {
return nullptr;
@@ -40,7 +41,8 @@ sk_sp<GrMtlTexture> GrMtlTexture::CreateNewTexture(GrMtlGpu* gpu, SkBudgeted bud
id<MTLTexture> texture = [gpu->device() newTextureWithDescriptor:descriptor];
- return sk_sp<GrMtlTexture>(new GrMtlTexture(gpu, budgeted, desc, texture, mipLevels > 1));
+ return sk_sp<GrMtlTexture>(new GrMtlTexture(gpu, budgeted, desc, texture, mipLevels > 1,
+ wasFullMipMapDataProvided));
}
// This method parallels GrTextureProxy::highestFilterMode
@@ -56,10 +58,11 @@ GrMtlTexture::GrMtlTexture(GrMtlGpu* gpu,
SkBudgeted budgeted,
const GrSurfaceDesc& desc,
id<MTLTexture> texture,
- bool isMipMapped)
+ bool isMipMapped,
+ bool wasFullMipMapDataProvided)
: GrSurface(gpu, desc)
, INHERITED(gpu, desc, kTexture2DSampler_GrSLType, highest_filter_mode(desc.fConfig),
- isMipMapped)
+ isMipMapped, wasFullMipMapDataProvided)
, fTexture(texture) {
}