diff options
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.h | 3 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 25 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpu.h | 3 |
4 files changed, 4 insertions, 29 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index a4a5b68ade..7e84553282 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -47,7 +47,6 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, fMultisampleDisableSupport = false; fUseNonVBOVertexAndIndexDynamicData = false; fIsCoreProfile = false; - fFullClearIsFree = false; fBindFragDataLocationSupport = false; fSRGBWriteControl = false; fRGBA8888PixelsOpsAreSlow = false; @@ -1143,7 +1142,6 @@ SkString GrGLCaps::dump() const { r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ? "YES" : "NO")); r.appendf("Use non-VBO for dynamic data: %s\n", (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); - r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO")); r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow? "YES" : "NO")); r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow? "YES" : "NO")); diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h index 01ce5bb19d..bbfdaef9b0 100644 --- a/src/gpu/gl/GrGLCaps.h +++ b/src/gpu/gl/GrGLCaps.h @@ -252,8 +252,6 @@ public: bool isCoreProfile() const { return fIsCoreProfile; } - bool fullClearIsFree() const { return fFullClearIsFree; } - bool bindFragDataLocationSupport() const { return fBindFragDataLocationSupport; } /** @@ -380,7 +378,6 @@ private: bool fMultisampleDisableSupport : 1; bool fUseNonVBOVertexAndIndexDynamicData : 1; bool fIsCoreProfile : 1; - bool fFullClearIsFree : 1; bool fBindFragDataLocationSupport : 1; bool fSRGBWriteControl : 1; bool fRGBA8888PixelsOpsAreSlow : 1; diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index faee922ac5..ec95557655 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -1569,33 +1569,14 @@ void GrGLGpu::disableScissor() { } } -void GrGLGpu::onClear(GrRenderTarget* target, const SkIRect* rect, GrColor color, - bool canIgnoreRect) { +void GrGLGpu::onClear(GrRenderTarget* target, const SkIRect& rect, GrColor color) { // parent class should never let us get here with no RT SkASSERT(target); GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(target); - if (canIgnoreRect && this->glCaps().fullClearIsFree()) { - rect = NULL; - } - - SkIRect clippedRect; - if (rect) { - // flushScissor expects rect to be clipped to the target. - clippedRect = *rect; - SkIRect rtRect = SkIRect::MakeWH(target->width(), target->height()); - if (clippedRect.intersect(rtRect)) { - rect = &clippedRect; - } else { - return; - } - } - - this->flushRenderTarget(glRT, rect); + this->flushRenderTarget(glRT, &rect); GrScissorState scissorState; - if (rect) { - scissorState.set(*rect); - } + scissorState.set(rect); this->flushScissor(scissorState, glRT->getViewport(), glRT->origin()); GrGLfloat r, g, b, a; diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index eb9795ca16..d247a685fd 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -132,8 +132,7 @@ private: bool attachStencilAttachmentToRenderTarget(GrStencilAttachment* sb, GrRenderTarget* rt) override; - void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, - bool canIgnoreRect) override; + void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) override; |