@@ -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
@@ -706,6 +710,10 @@ class ContentContext {
706710 return nullptr ;
707711 }
708712
713+ if (wireframe_) {
714+ opts.wireframe = true ;
715+ }
716+
709717 if (auto found = container.find (opts); found != container.end ()) {
710718 return found->second ->WaitAndGet ();
711719 }
@@ -731,6 +739,7 @@ class ContentContext {
731739 std::shared_ptr<Tessellator> tessellator_;
732740 std::shared_ptr<GlyphAtlasContext> glyph_atlas_context_;
733741 std::shared_ptr<scene::SceneContext> scene_context_;
742+ bool wireframe_ = false ;
734743
735744 FML_DISALLOW_COPY_AND_ASSIGN (ContentContext);
736745};
0 commit comments