Update LazySurfaceDesc to take a GrTextureType.
Bug: skia:12342
Change-Id: Ic57f3f30bc7d0a9d932eb4ac1c28b87b3b544ce4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439282
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrDynamicAtlas.cpp b/src/gpu/GrDynamicAtlas.cpp
index b1e5bb1..6422d58 100644
--- a/src/gpu/GrDynamicAtlas.cpp
+++ b/src/gpu/GrDynamicAtlas.cpp
@@ -96,7 +96,7 @@
fBackingTexture = resourceProvider->createTexture(
fTextureProxy->backingStoreDimensions(),
desc.fFormat,
- desc.fFormat.textureType(),
+ desc.fTextureType,
desc.fRenderable,
desc.fSampleCnt,
desc.fMipmapped,
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index a05e84a..0a9dd3e 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -339,7 +339,7 @@
return LazyCallbackResult(resourceProvider->createTexture(
desc.fDimensions,
desc.fFormat,
- desc.fFormat.textureType(),
+ desc.fTextureType,
colorType,
desc.fRenderable,
desc.fSampleCnt,
@@ -395,7 +395,7 @@
return LazyCallbackResult(resourceProvider->createTexture(
desc.fDimensions,
desc.fFormat,
- desc.fFormat.textureType(),
+ desc.fTextureType,
colorType,
GrRenderable::kNo,
1,
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp
index 27490d0..8fd61e9 100644
--- a/src/gpu/GrRenderTargetProxy.cpp
+++ b/src/gpu/GrRenderTargetProxy.cpp
@@ -159,6 +159,7 @@
GrMipmapped::kNo,
this->numSamples(),
this->backendFormat(),
+ GrTextureType::kNone,
this->isProtected(),
this->isBudgeted(),
};
diff --git a/src/gpu/GrSurfaceProxy.h b/src/gpu/GrSurfaceProxy.h
index 635ce30..8217383 100644
--- a/src/gpu/GrSurfaceProxy.h
+++ b/src/gpu/GrSurfaceProxy.h
@@ -71,6 +71,7 @@
GrMipmapped fMipmapped;
int fSampleCnt;
const GrBackendFormat& fFormat;
+ GrTextureType fTextureType;
GrProtected fProtected;
SkBudgeted fBudgeted;
};
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index 8b5e107..d7b5abf 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -203,6 +203,7 @@
fMipmapped,
1,
this->backendFormat(),
+ this->textureType(),
this->isProtected(),
this->isBudgeted(),
};
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp
index 8cf8266..4c07fe0 100644
--- a/src/gpu/GrTextureRenderTargetProxy.cpp
+++ b/src/gpu/GrTextureRenderTargetProxy.cpp
@@ -166,6 +166,7 @@
this->mipmapped(),
this->numSamples(),
this->backendFormat(),
+ this->textureType(),
this->isProtected(),
this->isBudgeted(),
};