aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLRenderTarget.cpp
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2016-05-04 10:08:12 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-04 10:08:12 -0700
commit31f25a037d7e3ee9de8f26e8cdd5c1f88da0f765 (patch)
tree41228362fb00c1b3ec8ce9f339532e763c9bc948 /src/gpu/gl/GrGLRenderTarget.cpp
parent85e38bcf9e45f7fea962ab98f89d640b8ca98156 (diff)
Revert of Allow stencils to be attached to render targets created via SkSurface::MakeFromBackendTextureAsRend… (patchset #1 id:60001 of https://codereview.chromium.org/1941353003/ )
Reason for revert: Breaking the ANGLE bots. Message is: Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION 8.59m elapsed, 1 active, 82 queued, 315MB RAM, 1442MB peak unit test SurfaceAttachStencil_Gpu step returned non-zero exit code: -1073741819 Original issue's description: > Allow stencils to be attached to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget > > This is a regression from "Refactor to separate backend object lifecycle > and GpuResource budget decision". > > GrGLRenderer::canAttemptStencilAttachment was incorrectly returning false > for all wrapped render targets. This function should return false only if > the FBO is wrapped (unowned). If the FBO is owned by Skia, we can attach > stencils. > > BUG=608238 > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1924183003 > > Committed: https://skia.googlesource.com/skia/+/0736f3386820f19c0fe90b5dda2094e253780071 TBR=bsalomon@google.com,kkinnunen@nvidia.com,ericrk@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=608238 Review-Url: https://codereview.chromium.org/1947143002
Diffstat (limited to 'src/gpu/gl/GrGLRenderTarget.cpp')
-rw-r--r--src/gpu/gl/GrGLRenderTarget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
index 026c46bd5f..3c27535825 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -159,8 +159,10 @@ GrGLGpu* GrGLRenderTarget::getGLGpu() const {
}
bool GrGLRenderTarget::canAttemptStencilAttachment() const {
- // Only modify the FBO's attachments if we have created the FBO.
- return this->fRTFBOOwnership == GrBackendObjectOwnership::kOwned;
+ // 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;
}
void GrGLRenderTarget::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {