diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-23 18:23:23 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-23 23:17:01 +0000 |
commit | 34df0d385bbe8cb97e0596e4e004caa617a72053 (patch) | |
tree | 8fa3a49d6b25a2f7a1122edcb17cbacb63e133e5 /src | |
parent | 22f6897b3f5a43a0cabce5fc09d24f487f02724e (diff) |
Hide GrBackendTexture/RenderTarget constructors that take a GrPixelConfig
Make GrGLTexture use the version that takes GrMipMapped.
Bug: skia:6718
Change-Id: Id3e801bcb5e781938e610bdea75bd92498117935
Reviewed-on: https://skia-review.googlesource.com/116221
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrBackendSurface.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/GrGLTexture.cpp | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gpu/GrBackendSurface.cpp b/src/gpu/GrBackendSurface.cpp index 863f531b2e..6f48a758a8 100644 --- a/src/gpu/GrBackendSurface.cpp +++ b/src/gpu/GrBackendSurface.cpp @@ -75,6 +75,8 @@ GrBackendTexture::GrBackendTexture(int width, , fVkInfo(vkInfo) {} #endif +#if GR_TEST_UTILS + GrBackendTexture::GrBackendTexture(int width, int height, GrPixelConfig config, @@ -92,6 +94,7 @@ GrBackendTexture::GrBackendTexture(int width, , fMipMapped(mipMapped) , fBackend(kOpenGL_GrBackend) , fGLInfo(glInfo) {} +#endif GrBackendTexture::GrBackendTexture(int width, int height, @@ -188,6 +191,8 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, , fVkInfo(vkInfo) {} #endif +#if GR_TEST_UTILS + GrBackendRenderTarget::GrBackendRenderTarget(int width, int height, int sampleCnt, @@ -201,6 +206,7 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, , fConfig(config) , fBackend(kOpenGL_GrBackend) , fGLInfo(glInfo) {} +#endif GrBackendRenderTarget::GrBackendRenderTarget(int width, int height, diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp index 8fe992794f..61bce35061 100644 --- a/src/gpu/gl/GrGLTexture.cpp +++ b/src/gpu/gl/GrGLTexture.cpp @@ -113,7 +113,8 @@ sk_sp<GrGLTexture> GrGLTexture::MakeWrapped(GrGLGpu* gpu, const GrSurfaceDesc& d bool GrGLTexture::onStealBackendTexture(GrBackendTexture* backendTexture, SkImage::BackendTextureReleaseProc* releaseProc) { - *backendTexture = GrBackendTexture(width(), height(), config(), fInfo); + *backendTexture = GrBackendTexture(this->width(), this->height(), + this->texturePriv().mipMapped(), fInfo); // Set the release proc to a no-op function. GL doesn't require any special cleanup. *releaseProc = [](GrBackendTexture){}; |