diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-12-11 15:42:09 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-12 15:21:09 +0000 |
commit | 344e9037e1befdee76691a1239a47829e6af4ea5 (patch) | |
tree | 16d7902f9ee8fc261bc17f465bb9488dccd56532 /src/gpu/GrRenderTargetContext.h | |
parent | 6e64f308910493b4327f7b8aadd7f4aabf3a9601 (diff) |
Prefer fullscreen clears on Qualcomm/GL
Adds Qualcomm to the set of GL devices on which we prefer fullscreen
clears.
Renames fullscreenClearIsFree in GrCaps to preferFullscreenClears.
Replaces 'bool canIgnoreClip' on GrRenderTargetContext::clear with an
enum.
Bug: skia:
Change-Id: I5b30298c4d0b092c398b9fea6060f3e2bea91e46
Reviewed-on: https://skia-review.googlesource.com/83060
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetContext.h')
-rw-r--r-- | src/gpu/GrRenderTargetContext.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h index 127063e097..304e6bc0bf 100644 --- a/src/gpu/GrRenderTargetContext.h +++ b/src/gpu/GrRenderTargetContext.h @@ -79,14 +79,19 @@ public: */ void discard(); + enum class CanClearFullscreen : bool { + kNo = false, + kYes = true + }; + /** * Clear the entire or rect of the render target, ignoring any clips. * @param rect the rect to clear or the whole thing if rect is NULL. * @param color the color to clear to. - * @param canIgnoreRect allows partial clears to be converted to whole - * clears on platforms for which that is cheap + * @param CanClearFullscreen allows partial clears to be converted to fullscreen clears on + * tiling platforms where that is an optimization. */ - void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect); + void clear(const SkIRect* rect, GrColor color, CanClearFullscreen); /** * Draw everywhere (respecting the clip) with the paint. @@ -409,7 +414,7 @@ private: friend void test_draw_op(GrRenderTargetContext*, std::unique_ptr<GrFragmentProcessor>, sk_sp<GrTextureProxy>); - void internalClear(const GrFixedClip&, const GrColor, bool canIgnoreClip); + void internalClear(const GrFixedClip&, const GrColor, CanClearFullscreen); // Only consumes the GrPaint if successful. bool drawFilledDRRect(const GrClip& clip, |