aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-09 09:33:19 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-09 18:20:40 +0000
commit26102cb6044700fd5c2a059437d75295be3dadaf (patch)
tree76cd45b1689e0170282f0c3a67332b864ea2f50f /src
parent2fa912a7a7c687c4638f6bedaf56c70401150bb9 (diff)
Make GrGpu::deleteTestingOnlyBackendTexture() take const GrBackendTexture&
Change-Id: Ibd00d0dc6d8c73628f26851e102defdbafab149b Reviewed-on: https://skia-review.googlesource.com/113164 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrGpu.h2
-rw-r--r--src/gpu/gl/GrGLGpu.cpp6
-rw-r--r--src/gpu/gl/GrGLGpu.h2
-rw-r--r--src/gpu/mock/GrMockGpu.cpp6
-rw-r--r--src/gpu/mock/GrMockGpu.h2
-rw-r--r--src/gpu/mtl/GrMtlGpu.h2
-rw-r--r--src/gpu/vk/GrVkGpu.cpp6
-rw-r--r--src/gpu/vk/GrVkGpu.h2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index d63a38b758..40d766431a 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -466,7 +466,7 @@ public:
* Frees a texture created by createTestingOnlyBackendTexture(). If ownership of the backend
* texture has been transferred to a GrContext using adopt semantics this should not be called.
*/
- virtual void deleteTestingOnlyBackendTexture(GrBackendTexture*) = 0;
+ virtual void deleteTestingOnlyBackendTexture(const GrBackendTexture&) = 0;
virtual GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType,
GrSRGBEncoded) = 0;
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 7499e761c9..7e69fbe341 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -4427,10 +4427,10 @@ bool GrGLGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
return (GR_GL_TRUE == result);
}
-void GrGLGpu::deleteTestingOnlyBackendTexture(GrBackendTexture* tex) {
- SkASSERT(kOpenGL_GrBackend == tex->backend());
+void GrGLGpu::deleteTestingOnlyBackendTexture(const GrBackendTexture& tex) {
+ SkASSERT(kOpenGL_GrBackend == tex.backend());
- if (const auto* info = tex->getGLTextureInfo()) {
+ if (const auto* info = tex.getGLTextureInfo()) {
GL_CALL(DeleteTextures(1, &info->fID));
}
}
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index fa3d9e09c7..79d74d2c09 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -150,7 +150,7 @@ public:
bool isRenderTarget,
GrMipMapped mipMapped) override;
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
- void deleteTestingOnlyBackendTexture(GrBackendTexture*) override;
+ void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override;
GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType,
GrSRGBEncoded) override;
diff --git a/src/gpu/mock/GrMockGpu.cpp b/src/gpu/mock/GrMockGpu.cpp
index 50b19f15e9..ad9dc882ce 100644
--- a/src/gpu/mock/GrMockGpu.cpp
+++ b/src/gpu/mock/GrMockGpu.cpp
@@ -129,10 +129,10 @@ bool GrMockGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
return fOutstandingTestingOnlyTextureIDs.contains(info->fID);
}
-void GrMockGpu::deleteTestingOnlyBackendTexture(GrBackendTexture* tex) {
- SkASSERT(kMock_GrBackend == tex->backend());
+void GrMockGpu::deleteTestingOnlyBackendTexture(const GrBackendTexture& tex) {
+ SkASSERT(kMock_GrBackend == tex.backend());
- const GrMockTextureInfo* info = tex->getMockTextureInfo();
+ const GrMockTextureInfo* info = tex.getMockTextureInfo();
if (info) {
fOutstandingTestingOnlyTextureIDs.remove(info->fID);
}
diff --git a/src/gpu/mock/GrMockGpu.h b/src/gpu/mock/GrMockGpu.h
index b58b9ff6d7..8bc72510ee 100644
--- a/src/gpu/mock/GrMockGpu.h
+++ b/src/gpu/mock/GrMockGpu.h
@@ -123,7 +123,7 @@ private:
GrBackendTexture createTestingOnlyBackendTexture(void* pixels, int w, int h, GrPixelConfig,
bool isRT, GrMipMapped) override;
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
- void deleteTestingOnlyBackendTexture(GrBackendTexture*) override;
+ void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override;
GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType,
GrSRGBEncoded) override;
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h
index 38b4e6303c..1babc8218e 100644
--- a/src/gpu/mtl/GrMtlGpu.h
+++ b/src/gpu/mtl/GrMtlGpu.h
@@ -144,7 +144,7 @@ private:
return GrBackendTexture();
}
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override { return false; }
- void deleteTestingOnlyBackendTexture(GrBackendTexture*) override {}
+ void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override {}
GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType,
GrSRGBEncoded) override {
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 1acbf02627..73787bf29b 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -1502,10 +1502,10 @@ bool GrVkGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
return false;
}
-void GrVkGpu::deleteTestingOnlyBackendTexture(GrBackendTexture* tex) {
- SkASSERT(kVulkan_GrBackend == tex->fBackend);
+void GrVkGpu::deleteTestingOnlyBackendTexture(const GrBackendTexture& tex) {
+ SkASSERT(kVulkan_GrBackend == tex.fBackend);
- if (const auto* info = tex->getVkImageInfo()) {
+ if (const auto* info = tex.getVkImageInfo()) {
// something in the command buffer may still be using this, so force submit
this->submitCommandBuffer(kForce_SyncQueue);
GrVkImage::DestroyImageInfo(this, const_cast<GrVkImageInfo*>(info));
diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h
index 81517af86e..b5ddcb894a 100644
--- a/src/gpu/vk/GrVkGpu.h
+++ b/src/gpu/vk/GrVkGpu.h
@@ -75,7 +75,7 @@ public:
bool isRenderTarget,
GrMipMapped) override;
bool isTestingOnlyBackendTexture(const GrBackendTexture&) const override;
- void deleteTestingOnlyBackendTexture(GrBackendTexture*) override;
+ void deleteTestingOnlyBackendTexture(const GrBackendTexture&) override;
GrBackendRenderTarget createTestingOnlyBackendRenderTarget(int w, int h, GrColorType,
GrSRGBEncoded) override;