diff options
author | Robert Phillips <robertphillips@google.com> | 2017-04-11 12:54:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-11 19:38:18 +0000 |
commit | 1119dc366e15ef737d05d3a087410ea40c508101 (patch) | |
tree | 0b1363476a28c6df8baf79a46dbee8a74eac48af /src/gpu/GrRenderTarget.cpp | |
parent | fafe135349bd34961a12bfd8185733709cd0e45e (diff) |
Remove discard from GrRenderTarget & force it to always go through a RenderTargetContext
This is a bit sloppy in that it ignores some instances where discards were being issued before.
The creation of the temp RTContext in the RenderTarget's discard method was causing an extra split in the opLists.
This is split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops)
Change-Id: Ic366d303280635763b0fae238c4df37c04fb8503
Reviewed-on: https://skia-review.googlesource.com/11125
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrRenderTarget.cpp')
-rw-r--r-- | src/gpu/GrRenderTarget.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp index f495cd34bb..9ea8596050 100644 --- a/src/gpu/GrRenderTarget.cpp +++ b/src/gpu/GrRenderTarget.cpp @@ -28,22 +28,6 @@ GrRenderTarget::GrRenderTarget(GrGpu* gpu, const GrSurfaceDesc& desc, Flags flag fResolveRect.setLargestInverted(); } -void GrRenderTarget::discard() { - // go through context so that all necessary flushing occurs - GrContext* context = this->getContext(); - if (!context) { - return; - } - - sk_sp<GrRenderTargetContext> renderTargetContext( - context->contextPriv().makeWrappedRenderTargetContext(sk_ref_sp(this), nullptr)); - if (!renderTargetContext) { - return; - } - - renderTargetContext->discard(); -} - void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) { if (kCanResolve_ResolveType == getResolveType()) { if (rect) { |