diff options
author | Brian Salomon <bsalomon@google.com> | 2017-05-18 12:30:34 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-18 16:56:50 +0000 |
commit | 84911546b9535a2fff6c5e07f588f175d5a04f45 (patch) | |
tree | a159707e8fbf27532b354b18feb231be69c12acc /src/gpu/gl | |
parent | 955235fa13db6cfd615dd6120e7f5060761fa3d1 (diff) |
Remove GrSurfaceDesc member from GrSurface.
Change-Id: I0fe979994e1e3fc457b952dfb5e0090c45fad771
Reviewed-on: https://skia-review.googlesource.com/17273
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/GrGLRenderTarget.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index c52d1d141f..5119b6397e 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -1524,12 +1524,12 @@ GrTexture* GrGLGpu::onCreateTexture(const GrSurfaceDesc& desc, return return_null_texture(); } - bool renderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); + bool isRenderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); GrGLTexture::IDDesc idDesc; idDesc.fOwnership = GrBackendObjectOwnership::kOwned; GrGLTexture::TexParams initialTexParams; - if (!this->createTextureImpl(desc, &idDesc.fInfo, renderTarget, &initialTexParams, texels)) { + if (!this->createTextureImpl(desc, &idDesc.fInfo, isRenderTarget, &initialTexParams, texels)) { return return_null_texture(); } @@ -1539,7 +1539,7 @@ GrTexture* GrGLGpu::onCreateTexture(const GrSurfaceDesc& desc, } GrGLTexture* tex; - if (renderTarget) { + if (isRenderTarget) { // unbind the texture from the texture unit before binding it to the frame buffer GL_CALL(BindTexture(idDesc.fInfo.fTarget, 0)); GrGLRenderTarget::IDDesc rtIDDesc; diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp index 7d45ceb619..00a78408d2 100644 --- a/src/gpu/gl/GrGLRenderTarget.cpp +++ b/src/gpu/gl/GrGLRenderTarget.cpp @@ -215,7 +215,7 @@ int GrGLRenderTarget::msaaSamples() const { if (fTexFBOID == kUnresolvableFBOID || fTexFBOID != fRTFBOID) { // If the render target's FBO is external (fTexFBOID == kUnresolvableFBOID), or if we own // the render target's FBO (fTexFBOID == fRTFBOID) then we use the provided sample count. - return SkTMax(1, fDesc.fSampleCnt); + return SkTMax(1, this->numStencilSamples()); } // When fTexFBOID == fRTFBOID, we either are not using MSAA, or MSAA is auto resolving, so use |