From 344e9037e1befdee76691a1239a47829e6af4ea5 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Mon, 11 Dec 2017 15:42:09 -0700 Subject: 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 Reviewed-by: Robert Phillips Commit-Queue: Chris Dalton --- include/gpu/GrCaps.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 9acb33e554..6cdc0e3ff6 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -55,6 +55,10 @@ public: bool usesMixedSamples() const { return fUsesMixedSamples; } bool preferClientSideDynamicBuffers() const { return fPreferClientSideDynamicBuffers; } + // On tilers, an initial fullscreen clear is an OPTIMIZATION. It allows the hardware to + // initialize each tile with a constant value rather than loading each pixel from memory. + bool preferFullscreenClears() const { return fPreferFullscreenClears; } + bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } bool blacklistCoverageCounting() const { return fBlacklistCoverageCounting; } @@ -144,8 +148,6 @@ public: return fBufferMapThreshold; } - bool fullClearIsFree() const { return fFullClearIsFree; } - /** True in environments that will issue errors if memory uploaded to buffers is not initialized (even if not read by draw calls). */ bool mustClearUploadedBufferData() const { return fMustClearUploadedBufferData; } @@ -192,7 +194,7 @@ protected: bool fInstanceAttribSupport : 1; bool fUsesMixedSamples : 1; bool fPreferClientSideDynamicBuffers : 1; - bool fFullClearIsFree : 1; + bool fPreferFullscreenClears : 1; bool fMustClearUploadedBufferData : 1; // Driver workaround -- cgit v1.2.3