Correct default blend mode, fix solid stroke shader to respect premultiplied source colors (flutter/engine#69)
This commit is contained in:
committed by
Dan Field
parent
f3ff1c9220
commit
d0e290089d
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user