|  | 
| 32 | 32 | #include "impeller/entity/conical_gradient_fill.frag.h" | 
| 33 | 33 | #include "impeller/entity/glyph_atlas.frag.h" | 
| 34 | 34 | #include "impeller/entity/glyph_atlas.vert.h" | 
|  | 35 | +#include "impeller/entity/glyph_atlas_color.frag.h" | 
| 35 | 36 | #include "impeller/entity/gradient_fill.vert.h" | 
| 36 | 37 | #include "impeller/entity/linear_gradient_fill.frag.h" | 
| 37 | 38 | #include "impeller/entity/linear_to_srgb_filter.frag.h" | 
| @@ -171,6 +172,8 @@ using SrgbToLinearFilterPipeline = | 
| 171 | 172 |                     SrgbToLinearFilterFragmentShader>; | 
| 172 | 173 | using GlyphAtlasPipeline = | 
| 173 | 174 |     RenderPipelineT<GlyphAtlasVertexShader, GlyphAtlasFragmentShader>; | 
|  | 175 | +using GlyphAtlasColorPipeline = | 
|  | 176 | +    RenderPipelineT<GlyphAtlasVertexShader, GlyphAtlasColorFragmentShader>; | 
| 174 | 177 | using PorterDuffBlendPipeline = | 
| 175 | 178 |     RenderPipelineT<BlendVertexShader, PorterDuffBlendFragmentShader>; | 
| 176 | 179 | // Instead of requiring new shaders for clips, the solid fill stages are used | 
| @@ -469,6 +472,11 @@ class ContentContext { | 
| 469 | 472 |     return GetPipeline(glyph_atlas_pipelines_, opts); | 
| 470 | 473 |   } | 
| 471 | 474 | 
 | 
|  | 475 | +  std::shared_ptr<Pipeline<PipelineDescriptor>> GetGlyphAtlasColorPipeline( | 
|  | 476 | +      ContentContextOptions opts) const { | 
|  | 477 | +    return GetPipeline(glyph_atlas_color_pipelines_, opts); | 
|  | 478 | +  } | 
|  | 479 | + | 
| 472 | 480 |   std::shared_ptr<Pipeline<PipelineDescriptor>> GetGeometryColorPipeline( | 
| 473 | 481 |       ContentContextOptions opts) const { | 
| 474 | 482 |     return GetPipeline(geometry_color_pipelines_, opts); | 
| @@ -654,7 +662,8 @@ class ContentContext { | 
| 654 | 662 | 
 | 
| 655 | 663 |   std::shared_ptr<Context> GetContext() const; | 
| 656 | 664 | 
 | 
| 657 |  | -  std::shared_ptr<GlyphAtlasContext> GetGlyphAtlasContext() const; | 
|  | 665 | +  std::shared_ptr<GlyphAtlasContext> GetGlyphAtlasContext( | 
|  | 666 | +      GlyphAtlas::Type type) const; | 
| 658 | 667 | 
 | 
| 659 | 668 |   const Capabilities& GetDeviceCapabilities() const; | 
| 660 | 669 | 
 | 
| @@ -722,6 +731,7 @@ class ContentContext { | 
| 722 | 731 |   mutable Variants<SrgbToLinearFilterPipeline> srgb_to_linear_filter_pipelines_; | 
| 723 | 732 |   mutable Variants<ClipPipeline> clip_pipelines_; | 
| 724 | 733 |   mutable Variants<GlyphAtlasPipeline> glyph_atlas_pipelines_; | 
|  | 734 | +  mutable Variants<GlyphAtlasColorPipeline> glyph_atlas_color_pipelines_; | 
| 725 | 735 |   mutable Variants<GeometryColorPipeline> geometry_color_pipelines_; | 
| 726 | 736 |   mutable Variants<YUVToRGBFilterPipeline> yuv_to_rgb_filter_pipelines_; | 
| 727 | 737 |   mutable Variants<PorterDuffBlendPipeline> porter_duff_blend_pipelines_; | 
| @@ -813,7 +823,8 @@ class ContentContext { | 
| 813 | 823 | 
 | 
| 814 | 824 |   bool is_valid_ = false; | 
| 815 | 825 |   std::shared_ptr<Tessellator> tessellator_; | 
| 816 |  | -  std::shared_ptr<GlyphAtlasContext> glyph_atlas_context_; | 
|  | 826 | +  std::shared_ptr<GlyphAtlasContext> alpha_glyph_atlas_context_; | 
|  | 827 | +  std::shared_ptr<GlyphAtlasContext> color_glyph_atlas_context_; | 
| 817 | 828 |   std::shared_ptr<scene::SceneContext> scene_context_; | 
| 818 | 829 |   bool wireframe_ = false; | 
| 819 | 830 | 
 | 
|  | 
0 commit comments