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

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

Issue 1941353003: Allow stencils to be attached to render targets created via SkSurface::MakeFromBackendTextureAsRend… (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fix unit tests to avoid ANGLE issues Created 4 years, 7 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 | « no previous file | tests/SurfaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLRenderTarget.cpp
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
index 3c275358258153769d95eedc56cfa4e761abebea..27713b2dd26010adc187eb452adc4bd5a027620b 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -159,10 +159,10 @@ GrGLGpu* GrGLRenderTarget::getGLGpu() const {
}
bool GrGLRenderTarget::canAttemptStencilAttachment() const {
- // When we have not created the FBO ID we do not attempt to modify its attachments.
- // Direct GrGLRenderTarget instances are always created with CreateWrapped.
- SkASSERT(this->resourcePriv().refsWrappedObjects());
- return false;
+ // Only modify the FBO's attachments if we have created the FBO. Public APIs do not currently
+ // allow for borrowed FBO ownership, so we can safely assume that if an object is owned,
+ // Skia created it.
+ return this->fRTFBOOwnership == GrBackendObjectOwnership::kOwned;
}
void GrGLRenderTarget::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
« no previous file with comments | « no previous file | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698