Revert of Clear stencil buffer before using it for drawing (patchset #2 id:20001...
authorstani <stani@google.com>
Tue, 20 Sep 2016 20:24:49 +0000 (13:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 20 Sep 2016 20:24:49 +0000 (13:24 -0700)
Reason for revert:
performance regression in Android macrobench tests

Original issue's description:
> Clear stencil buffer before using it for drawing
>
> Clear stencil buffer before using it for drawing. This is
> resolving an issue with a failing android CTS test in drawArc.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342873004
>
> Committed: https://skia.googlesource.com/skia/+/c326a383e1069497884905f9dd3e720e17d8fcb5

TBR=bsalomon@google.com,reed@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2355923002

src/gpu/GrGpu.cpp

index e167bd2..e14e892 100644 (file)
@@ -223,13 +223,7 @@ GrRenderTarget* GrGpu::wrapBackendRenderTarget(const GrBackendRenderTargetDesc&
         return nullptr;
     }
     this->handleDirtyContext();
-    auto res = this->onWrapBackendRenderTarget(desc, ownership);
-    if (desc.fStencilBits) {
-        // Our algorithms that use the stencil buffer assume it is
-        // initially cleared.
-        this->clearStencil(res);
-    }
-    return res;
+    return this->onWrapBackendRenderTarget(desc, ownership);
 }
 
 GrRenderTarget* GrGpu::wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& desc) {