| 1 |
/* |
| 2 |
* Copyright 2023 Google LLC |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef skiatest_graphite_TestOptions_DEFINED |
| 9 |
#define skiatest_graphite_TestOptions_DEFINED |
| 10 |
|
| 11 |
#include "include/gpu/graphite/ContextOptions.h" |
| 12 |
|
| 13 |
namespace skiatest::graphite { |
| 14 |
|
| 15 |
struct TestOptions { |
| 16 |
TestOptions() = default; |
| 17 |
TestOptions(const TestOptions&) = default; |
| 18 |
TestOptions(TestOptions&&) = default; |
| 19 |
TestOptions& operator=(const TestOptions&) = default; |
| 20 |
TestOptions& operator=(TestOptions&&) = default; |
| 21 |
|
| 22 |
bool hasDawnOptions() const { |
| 23 |
#if defined(SK_DAWN) |
| 24 |
return fDisableTintSymbolRenaming || |
| 25 |
fNeverYieldToWebGPU || |
| 26 |
fUseWGPUTextureView; |
| 27 |
#else |
| 28 |
return false; |
| 29 |
#endif |
| 30 |
} |
| 31 |
|
| 32 |
skgpu::graphite::ContextOptions fContextOptions = {}; |
| 33 |
|
| 34 |
#if defined(SK_DAWN) |
| 35 |
bool fDisableTintSymbolRenaming = false; |
| 36 |
bool fNeverYieldToWebGPU = false; |
| 37 |
bool fUseWGPUTextureView = false; |
| 38 |
#endif |
| 39 |
}; |
| 40 |
|
| 41 |
} // namespace skiatest::graphite |
| 42 |
|
| 43 |
#endif |