@@ -153,30 +153,6 @@ class ContentContext {
153
153
std::shared_ptr<Texture> MakeSubpass (ISize texture_size,
154
154
SubpassCallback subpass_callback) const ;
155
155
156
- private:
157
- std::shared_ptr<Context> context_;
158
-
159
- template <class T >
160
- using Variants = std::unordered_map<ContentContextOptions,
161
- std::unique_ptr<T>,
162
- ContentContextOptions::Hash,
163
- ContentContextOptions::Equal>;
164
-
165
- // These are mutable because while the prototypes are created eagerly, any
166
- // variants requested from that are lazily created and cached in the variants
167
- // map.
168
- mutable Variants<GradientFillPipeline> gradient_fill_pipelines_;
169
- mutable Variants<SolidFillPipeline> solid_fill_pipelines_;
170
- mutable Variants<BlendPipeline> texture_blend_pipelines_;
171
- mutable Variants<BlendScreenPipeline> blend_screen_pipelines_;
172
- mutable Variants<BlendColorburnPipeline> blend_colorburn_pipelines_;
173
- mutable Variants<TexturePipeline> texture_pipelines_;
174
- mutable Variants<GaussianBlurPipeline> gaussian_blur_pipelines_;
175
- mutable Variants<BorderMaskBlurPipeline> border_mask_blur_pipelines_;
176
- mutable Variants<SolidStrokePipeline> solid_stroke_pipelines_;
177
- mutable Variants<ClipPipeline> clip_pipelines_;
178
- mutable Variants<GlyphAtlasPipeline> glyph_atlas_pipelines_;
179
-
180
156
static void ApplyOptionsToDescriptor (PipelineDescriptor& desc,
181
157
const ContentContextOptions& options) {
182
158
auto blend_mode = options.blend_mode ;
@@ -218,7 +194,7 @@ class ContentContext {
218
194
case Entity::BlendMode::kSourceOver :
219
195
color0.dst_alpha_blend_factor = BlendFactor::kOneMinusSourceAlpha ;
220
196
color0.dst_color_blend_factor = BlendFactor::kOneMinusSourceAlpha ;
221
- color0.src_alpha_blend_factor = BlendFactor::kSourceAlpha ;
197
+ color0.src_alpha_blend_factor = BlendFactor::kOne ;
222
198
color0.src_color_blend_factor = BlendFactor::kOne ;
223
199
break ;
224
200
case Entity::BlendMode::kDestinationOver :
@@ -296,6 +272,30 @@ class ContentContext {
296
272
}
297
273
}
298
274
275
+ private:
276
+ std::shared_ptr<Context> context_;
277
+
278
+ template <class T >
279
+ using Variants = std::unordered_map<ContentContextOptions,
280
+ std::unique_ptr<T>,
281
+ ContentContextOptions::Hash,
282
+ ContentContextOptions::Equal>;
283
+
284
+ // These are mutable because while the prototypes are created eagerly, any
285
+ // variants requested from that are lazily created and cached in the variants
286
+ // map.
287
+ mutable Variants<GradientFillPipeline> gradient_fill_pipelines_;
288
+ mutable Variants<SolidFillPipeline> solid_fill_pipelines_;
289
+ mutable Variants<BlendPipeline> texture_blend_pipelines_;
290
+ mutable Variants<BlendScreenPipeline> blend_screen_pipelines_;
291
+ mutable Variants<BlendColorburnPipeline> blend_colorburn_pipelines_;
292
+ mutable Variants<TexturePipeline> texture_pipelines_;
293
+ mutable Variants<GaussianBlurPipeline> gaussian_blur_pipelines_;
294
+ mutable Variants<BorderMaskBlurPipeline> border_mask_blur_pipelines_;
295
+ mutable Variants<SolidStrokePipeline> solid_stroke_pipelines_;
296
+ mutable Variants<ClipPipeline> clip_pipelines_;
297
+ mutable Variants<GlyphAtlasPipeline> glyph_atlas_pipelines_;
298
+
299
299
template <class TypedPipeline >
300
300
std::shared_ptr<Pipeline> GetPipeline (Variants<TypedPipeline>& container,
301
301
ContentContextOptions opts) const {
0 commit comments