aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContextOptions.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-08-30 15:14:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-30 19:35:27 +0000
commit195c05b6d5afbd65f803816938e24eebd51292c8 (patch)
tree09464cb77b796259a4ca0d75a32f8ed4d0dcf85a /include/gpu/GrContextOptions.h
parentad8a43f7698071f00ce024a935b0bc04a4b19a41 (diff)
Move several GrContextOptions fields behind GR_TEST_UTILS
Bug: skia: Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226 Reviewed-on: https://skia-review.googlesource.com/40881 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include/gpu/GrContextOptions.h')
-rw-r--r--include/gpu/GrContextOptions.h65
1 files changed, 28 insertions, 37 deletions
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 8c577842a0..a4298755b7 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -10,6 +10,7 @@
#include "SkTypes.h"
#include "GrTypes.h"
+#include "../private/GrTypesPriv.h"
class SkExecutor;
@@ -25,11 +26,6 @@ struct GrContextOptions {
int fMaxTextureSizeOverride = SK_MaxS32;
- /** If non-zero, overrides the maximum size of a tile for sw-backed images and bitmaps rendered
- by SkGpuDevice. */
- int fMaxTileSizeOverride = 0;
- bool fSuppressDualSourceBlending = false;
-
/** the threshold in bytes above which we will use a buffer mapping API to map vertex and index
buffers to CPU memory in order to update them. A value of -1 means the GrContext should
deduce the optimal value for this platform. */
@@ -82,52 +78,47 @@ struct GrContextOptions {
bool fDisableGpuYUVConversion = false;
/**
- * If true, the caps will never report driver support for path rendering.
+ * The maximum size of cache textures used for Skia's Glyph cache.
*/
- bool fSuppressPathRendering = false;
+ float fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4;
/**
- * Render everything in wireframe
+ * Bugs on certain drivers cause stencil buffers to leak. This flag causes Skia to avoid
+ * allocating stencil buffers and use alternate rasterization paths, avoiding the leak.
*/
- bool fWireframeMode = false;
+ bool fAvoidStencilBuffers = false;
+#if GR_TEST_UTILS
/**
- * Allows the client to include or exclude specific GPU path renderers.
+ * Private options that are only meant for testing within Skia's tools.
*/
- enum class GpuPathRenderers {
- kNone = 0, // Always use sofware masks and/or GrDefaultPathRenderer.
- kDashLine = 1 << 0,
- kStencilAndCover = 1 << 1,
- kMSAA = 1 << 2,
- kAAConvex = 1 << 3,
- kAALinearizing = 1 << 4,
- kSmall = 1 << 5,
- kCoverageCounting = 1 << 6,
- kTessellating = 1 << 7,
-
- kAll = (kTessellating | (kTessellating - 1)),
-
- // Temporarily disabling CCPR by default until it has had a time to soak.
- kDefault = kAll & ~kCoverageCounting,
-
- // For legacy. To be removed when updated in Android.
- kDistanceField = kSmall
- };
- GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kDefault;
+ /**
+ * If non-zero, overrides the maximum size of a tile for sw-backed images and bitmaps rendered
+ * by SkGpuDevice.
+ */
+ int fMaxTileSizeOverride = 0;
/**
- * The maximum size of cache textures used for Skia's Glyph cache.
+ * Prevents use of dual source blending, to test that all xfer modes work correctly without it.
*/
- float fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4;
+ bool fSuppressDualSourceBlending = false;
/**
- * Bugs on certain drivers cause stencil buffers to leak. This flag causes Skia to avoid
- * allocating stencil buffers and use alternate rasterization paths, avoiding the leak.
+ * If true, the caps will never report driver support for path rendering.
*/
- bool fAvoidStencilBuffers = false;
-};
+ bool fSuppressPathRendering = false;
-GR_MAKE_BITFIELD_CLASS_OPS(GrContextOptions::GpuPathRenderers)
+ /**
+ * Render everything in wireframe
+ */
+ bool fWireframeMode = false;
+
+ /**
+ * Include or exclude specific GPU path renderers.
+ */
+ GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kDefault;
+#endif
+};
#endif