From fbdc080d3cae3695544ffbc05c6ff6f5b4514c02 Mon Sep 17 00:00:00 2001 From: Jim Van Verth Date: Tue, 2 May 2017 16:15:53 -0400 Subject: Add wireframe mode to Viewer. Change-Id: I0ff11088465a4702acf9841a791d76f286ddbaf1 Reviewed-on: https://skia-review.googlesource.com/15147 Commit-Queue: Jim Van Verth Reviewed-by: Brian Osman --- include/gpu/GrCaps.h | 5 ++++- include/gpu/GrContextOptions.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index abd10a1c01..f99405e27f 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -178,6 +178,8 @@ public: is not initialized (even if not read by draw calls). */ bool mustClearUploadedBufferData() const { return fMustClearUploadedBufferData; } + bool wireframeMode() const { return fWireframeMode; } + bool sampleShadingSupport() const { return fSampleShadingSupport; } bool fenceSyncSupport() const { return fFenceSyncSupport; } @@ -260,7 +262,8 @@ private: virtual void onApplyOptionsOverrides(const GrContextOptions&) {} bool fSuppressPrints : 1; - bool fImmediateFlush: 1; + bool fImmediateFlush : 1; + bool fWireframeMode : 1; typedef SkRefCnt INHERITED; }; diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h index f1517040e7..aa7bcf285b 100644 --- a/include/gpu/GrContextOptions.h +++ b/include/gpu/GrContextOptions.h @@ -78,6 +78,11 @@ struct GrContextOptions { */ bool fSuppressPathRendering = false; + /** + * Render everything in wireframe + */ + bool fWireframeMode = false; + /** * Allows the client to include or exclude specific GPU path renderers. */ -- cgit v1.2.3