Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1943843002: Revert of Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRender… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkSurface.h ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 3372d4289701ef03a8c7900c66c7434e8c9aa26e..9d2984f186e7198b63362394c86b86ff893e9818 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -723,20 +723,19 @@
}
#endif
- GrGLTexture::IDDesc idDesc;
- idDesc.fOwnership = GrBackendObjectOwnership::kBorrowed;
+ GrGLTextureInfo texInfo;
GrSurfaceDesc surfDesc;
#ifdef SK_IGNORE_GL_TEXTURE_TARGET
- idDesc.fInfo.fID = static_cast<GrGLuint>(desc.fTextureHandle);
+ texInfo.fID = static_cast<GrGLuint>(desc.fTextureHandle);
// We only support GL_TEXTURE_2D at the moment.
- idDesc.fInfo.fTarget = GR_GL_TEXTURE_2D;
+ texInfo.fTarget = GR_GL_TEXTURE_2D;
#else
- idDesc.fInfo = *info;
+ texInfo = *info;
#endif
- if (GR_GL_TEXTURE_RECTANGLE != idDesc.fInfo.fTarget &&
- GR_GL_TEXTURE_2D != idDesc.fInfo.fTarget) {
+ if (GR_GL_TEXTURE_RECTANGLE != texInfo.fTarget &&
+ GR_GL_TEXTURE_2D != texInfo.fTarget) {
// Only texture rectangle and texture 2d are supported. We do not check whether texture
// rectangle is supported by Skia - if the caller provided us with a texture rectangle,
// we assume the necessary support exists.
@@ -759,10 +758,10 @@
}
GrGLRenderTarget::IDDesc rtIDDesc;
- if (!this->createRenderTargetObjects(surfDesc, idDesc.fInfo, &rtIDDesc)) {
+ if (!this->createRenderTargetObjects(surfDesc, texInfo, &rtIDDesc)) {
return nullptr;
}
- return GrGLTextureRenderTarget::CreateWrapped(this, surfDesc, idDesc, rtIDDesc);
+ return GrGLRenderTarget::CreateWrapped(this, surfDesc, rtIDDesc, 0);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « include/core/SkSurface.h ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698