mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] Emulate Skia's SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER in drawVertices (flutter/engine#40893)
[Impeller] Emulate Skia's SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER in drawVertices
This commit is contained in:
parent
c34b9d9a73
commit
ae08695e6d
@ -470,6 +470,13 @@ void Canvas::DrawTextFrame(const TextFrame& text_frame,
|
||||
void Canvas::DrawVertices(const std::shared_ptr<VerticesGeometry>& vertices,
|
||||
BlendMode blend_mode,
|
||||
const Paint& paint) {
|
||||
// Override the blend mode with kDestination in order to match the behavior
|
||||
// of Skia's SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER flag, which
|
||||
// is enabled when the Flutter engine builds Skia.
|
||||
if (paint.color_source_type == Paint::ColorSourceType::kColor) {
|
||||
blend_mode = BlendMode::kDestination;
|
||||
}
|
||||
|
||||
Entity entity;
|
||||
entity.SetTransformation(GetCurrentTransformation());
|
||||
entity.SetStencilDepth(GetStencilDepth());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user