Correct default blend mode, fix solid stroke shader to respect premultiplied source colors (flutter/engine#69)

This commit is contained in:
Brandon DeRosier
2022-03-10 10:54:59 -08:00
committed by Dan Field
parent f3ff1c9220
commit d0e290089d
2 changed files with 2 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ using ClipPipeline = PipelineT<SolidFillVertexShader, SolidFillFragmentShader>;
struct ContentContextOptions {
SampleCount sample_count = SampleCount::kCount1;
Entity::BlendMode blend_mode = Entity::BlendMode::kSource;
Entity::BlendMode blend_mode = Entity::BlendMode::kSourceOver;
struct Hash {
constexpr std::size_t operator()(const ContentContextOptions& o) const {

View File

@@ -8,6 +8,5 @@ in float v_pen_down;
out vec4 frag_color;
void main() {
frag_color = stroke_color;
frag_color.a *= floor(v_pen_down);
frag_color = stroke_color * floor(v_pen_down);
}