Move clear-as-draw caps into GrCaps
Bug: skia:
Change-Id: Ib029f337f5e61366e2550e77dc99310b44d03f84
Reviewed-on: https://skia-review.googlesource.com/c/182970
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index c4809f5..c9e8e54 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -225,13 +225,14 @@
}
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ClearOp, reporter, ctxInfo) {
+ // Regular clear
clear_op_test(reporter, ctxInfo.grContext());
- if (ctxInfo.backend() == GrBackendApi::kOpenGL) {
- GrContextOptions options(ctxInfo.options());
- options.fUseDrawInsteadOfGLClear = GrContextOptions::Enable::kYes;
- sk_gpu_test::GrContextFactory workaroundFactory(options);
- clear_op_test(reporter, workaroundFactory.get(ctxInfo.type()));
- }
+
+ // Force drawing for clears
+ GrContextOptions options(ctxInfo.options());
+ options.fUseDrawInsteadOfClear = GrContextOptions::Enable::kYes;
+ sk_gpu_test::GrContextFactory workaroundFactory(options);
+ clear_op_test(reporter, workaroundFactory.get(ctxInfo.type()));
}
void fullscreen_clear_with_layer_test(skiatest::Reporter* reporter, GrContext* context) {
@@ -290,11 +291,12 @@
}
// From crbug.com/768134
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(FullScreenClearWithLayers, reporter, ctxInfo) {
+ // Regular clear
fullscreen_clear_with_layer_test(reporter, ctxInfo.grContext());
- if (ctxInfo.backend() == GrBackendApi::kOpenGL) {
- GrContextOptions options(ctxInfo.options());
- options.fUseDrawInsteadOfGLClear = GrContextOptions::Enable::kYes;
- sk_gpu_test::GrContextFactory workaroundFactory(options);
- fullscreen_clear_with_layer_test(reporter, workaroundFactory.get(ctxInfo.type()));
- }
+
+ // Use draws for clears
+ GrContextOptions options(ctxInfo.options());
+ options.fUseDrawInsteadOfClear = GrContextOptions::Enable::kYes;
+ sk_gpu_test::GrContextFactory workaroundFactory(options);
+ fullscreen_clear_with_layer_test(reporter, workaroundFactory.get(ctxInfo.type()));
}