@@ -269,13 +269,14 @@ struct ContentContextOptions {
269269 PrimitiveType primitive_type = PrimitiveType::kTriangle ;
270270 std::optional<PixelFormat> color_attachment_pixel_format;
271271 bool has_stencil_attachment = true ;
272+ bool wireframe = false ;
272273
273274 struct Hash {
274275 constexpr std::size_t operator ()(const ContentContextOptions& o) const {
275276 return fml::HashCombine (o.sample_count , o.blend_mode , o.stencil_compare ,
276277 o.stencil_operation , o.primitive_type ,
277278 o.color_attachment_pixel_format ,
278- o.has_stencil_attachment );
279+ o.has_stencil_attachment , o. wireframe );
279280 }
280281 };
281282
@@ -289,7 +290,8 @@ struct ContentContextOptions {
289290 lhs.primitive_type == rhs.primitive_type &&
290291 lhs.color_attachment_pixel_format ==
291292 rhs.color_attachment_pixel_format &&
292- lhs.has_stencil_attachment == rhs.has_stencil_attachment ;
293+ lhs.has_stencil_attachment == rhs.has_stencil_attachment &&
294+ lhs.wireframe == rhs.wireframe ;
293295 }
294296 };
295297
@@ -598,6 +600,8 @@ class ContentContext {
598600
599601 const IDeviceCapabilities& GetDeviceCapabilities () const ;
600602
603+ void SetWireframe (bool wireframe);
604+
601605 using SubpassCallback =
602606 std::function<bool (const ContentContext&, RenderPass&)>;
603607
@@ -705,6 +709,10 @@ class ContentContext {
705709 return nullptr ;
706710 }
707711
712+ if (wireframe_) {
713+ opts.wireframe = true ;
714+ }
715+
708716 if (auto found = container.find (opts); found != container.end ()) {
709717 return found->second ->WaitAndGet ();
710718 }
@@ -730,6 +738,7 @@ class ContentContext {
730738 std::shared_ptr<Tessellator> tessellator_;
731739 std::shared_ptr<GlyphAtlasContext> glyph_atlas_context_;
732740 std::shared_ptr<scene::SceneContext> scene_context_;
741+ bool wireframe_ = false ;
733742
734743 FML_DISALLOW_COPY_AND_ASSIGN (ContentContext);
735744};
0 commit comments