aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-07-30 10:24:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-30 14:54:25 +0000
commit60dd8c746428fb6218fff5f437b1b7c5256bba13 (patch)
treebc9c5c5b16de0ecf6d60452d69dbfd870126f97a /src/gpu/mtl
parent12e42565886ac6b28cbcae40d63ee093bde3e630 (diff)
Introduce enum class for texture type.
This represents the GL texture "target" but at the API-neutral level. It will be needed here because proxy's that wrap imported texture's need to know about sampling restrictions. Change-Id: Ie811a6f6d04ba1b04faa6908422dca64e8e447c8 Reviewed-on: https://skia-review.googlesource.com/144304 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/mtl')
-rw-r--r--src/gpu/mtl/GrMtlTexture.mm9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/mtl/GrMtlTexture.mm b/src/gpu/mtl/GrMtlTexture.mm
index 0511df29a8..1b5ffcbb33 100644
--- a/src/gpu/mtl/GrMtlTexture.mm
+++ b/src/gpu/mtl/GrMtlTexture.mm
@@ -22,8 +22,7 @@ GrMtlTexture::GrMtlTexture(GrMtlGpu* gpu,
id<MTLTexture> texture,
GrMipMapsStatus mipMapsStatus)
: GrSurface(gpu, desc)
- , INHERITED(gpu, desc, kTexture2DSampler_GrSLType, highest_filter_mode(desc.fConfig),
- mipMapsStatus)
+ , INHERITED(gpu, desc, GrTextureType::k2D, highest_filter_mode(desc.fConfig), mipMapsStatus)
, fTexture(texture) {
SkASSERT((GrMipMapsStatus::kNotAllocated == mipMapsStatus) == (1 == texture.mipmapLevelCount));
this->registerWithCache(budgeted);
@@ -35,8 +34,7 @@ GrMtlTexture::GrMtlTexture(GrMtlGpu* gpu,
id<MTLTexture> texture,
GrMipMapsStatus mipMapsStatus)
: GrSurface(gpu, desc)
- , INHERITED(gpu, desc, kTexture2DSampler_GrSLType, highest_filter_mode(desc.fConfig),
- mipMapsStatus)
+ , INHERITED(gpu, desc, GrTextureType::k2D, highest_filter_mode(desc.fConfig), mipMapsStatus)
, fTexture(texture) {
SkASSERT((GrMipMapsStatus::kNotAllocated == mipMapsStatus) == (1 == texture.mipmapLevelCount));
this->registerWithCacheWrapped();
@@ -47,8 +45,7 @@ GrMtlTexture::GrMtlTexture(GrMtlGpu* gpu,
id<MTLTexture> texture,
GrMipMapsStatus mipMapsStatus)
: GrSurface(gpu, desc)
- , INHERITED(gpu, desc, kTexture2DSampler_GrSLType, highest_filter_mode(desc.fConfig),
- mipMapsStatus)
+ , INHERITED(gpu, desc, GrTextureType::k2D, highest_filter_mode(desc.fConfig), mipMapsStatus)
, fTexture(texture) {
SkASSERT((GrMipMapsStatus::kNotAllocated == mipMapsStatus) == (1 == texture.mipmapLevelCount));
}