aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/GrRenderTarget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index 0d36fd0319..5630d58297 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -95,6 +95,10 @@ void GrRenderTarget::overrideResolveRect(const GrIRect rect) {
}
void GrRenderTarget::setStencilBuffer(GrStencilBuffer* stencilBuffer) {
+ if (stencilBuffer == fStencilBuffer) {
+ return;
+ }
+
if (NULL != fStencilBuffer) {
fStencilBuffer->unref();