| 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 skgpu_graphite_ContextOptionsPriv_DEFINED |
| 9 |
#define skgpu_graphite_ContextOptionsPriv_DEFINED |
| 10 |
|
| 11 |
#include "include/private/base/SkMath.h" |
| 12 |
|
| 13 |
#include <optional> |
| 14 |
|
| 15 |
namespace skgpu::graphite { |
| 16 |
|
| 17 |
enum class PathRendererStrategy; |
| 18 |
|
| 19 |
/** |
| 20 |
* Private options that are only meant for testing within Skia's tools. |
| 21 |
*/ |
| 22 |
struct ContextOptionsPriv { |
| 23 |
|
| 24 |
int fMaxTextureSizeOverride = SK_MaxS32; |
| 25 |
|
| 26 |
/** |
| 27 |
* If true, will store a pointer in Recorder that points back to the Context |
| 28 |
* that created it. Used by readPixels() and other methods that normally require a Context. |
| 29 |
*/ |
| 30 |
bool fStoreContextRefInRecorder = false; |
| 31 |
|
| 32 |
/** |
| 33 |
* Override Caps' default strategy heuristics to prioritize this one if set *and* is supported. |
| 34 |
*/ |
| 35 |
std::optional<PathRendererStrategy> fPathRendererStrategy; |
| 36 |
}; |
| 37 |
|
| 38 |
} // namespace skgpu::graphite |
| 39 |
|
| 40 |
#endif // skgpu_graphite_ContextOptionsPriv_DEFINED |