Add ANGLE workaround to prefer flushes over VRAM usage
On the whole, https://codereview.chromium.org/1286203002/ (Defer flushes if kPreferNoIO is specified) improved performance but it did cause a performance regression on ANGLE. This CL disables the deferral of flushes on ANGLE until we can add a separate incremental flushing mechanism.
TBR=bsalomon@google.com
BUG=skia:4201
BUG=521529
Review URL: https://codereview.chromium.org/1287193008
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 48bcb28..248135d 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -133,6 +133,8 @@
return fUseDrawInsteadOfPartialRenderTargetWrite;
}
+ bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; }
+
/**
* Indicates the capabilities of the fixed function blend unit.
*/
@@ -249,6 +251,9 @@
bool fUseDrawInsteadOfClear : 1;
bool fUseDrawInsteadOfPartialRenderTargetWrite : 1;
+ // ANGLE workaround
+ bool fPreferVRAMUseOverFlushes : 1;
+
BlendEquationSupport fBlendEquationSupport;
uint32_t fAdvBlendEqBlacklist;
GR_STATIC_ASSERT(kLast_GrBlendEquation < 32);