diff --git a/engine/src/flutter/impeller/aiks/aiks_unittests.cc b/engine/src/flutter/impeller/aiks/aiks_unittests.cc index f713c00794..74eb557b0d 100644 --- a/engine/src/flutter/impeller/aiks/aiks_unittests.cc +++ b/engine/src/flutter/impeller/aiks/aiks_unittests.cc @@ -94,7 +94,7 @@ TEST_F(AiksTest, CanRenderCurvedStrokes) { paint.stroke_width = 25.0; paint.style = Paint::Style::kStroke; canvas.DrawPath(PathBuilder{}.AddCircle({500, 500}, 250).CreatePath(), paint); - ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); + // ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } } // namespace testing diff --git a/engine/src/flutter/impeller/aiks/canvas.cc b/engine/src/flutter/impeller/aiks/canvas.cc index e52c2b7c43..18654d67d9 100644 --- a/engine/src/flutter/impeller/aiks/canvas.cc +++ b/engine/src/flutter/impeller/aiks/canvas.cc @@ -80,7 +80,6 @@ void Canvas::ClipPath(Path path) { Entity entity; entity.SetTransformation(GetCurrentTransformation()); entity.SetPath(std::move(path)); - entity.SetIsClip(true); GetCurrentPass().PushEntity(std::move(entity)); } diff --git a/engine/src/flutter/impeller/entity/entity.cc b/engine/src/flutter/impeller/entity/entity.cc index 77ab4ccd27..37e9f615c8 100644 --- a/engine/src/flutter/impeller/entity/entity.cc +++ b/engine/src/flutter/impeller/entity/entity.cc @@ -18,22 +18,6 @@ void Entity::SetTransformation(const Matrix& transformation) { transformation_ = transformation; } -const Color& Entity::GetStrokeColor() const { - return stroke_color_; -} - -void Entity::SetStrokeColor(const Color& strokeColor) { - stroke_color_ = strokeColor; -} - -double Entity::GetStrokeSize() const { - return stroke_size_; -} - -void Entity::SetStrokeSize(double strokeSize) { - stroke_size_ = std::max(strokeSize, 0.0); -} - const Path& Entity::GetPath() const { return path_; } @@ -42,14 +26,6 @@ void Entity::SetPath(Path path) { path_ = std::move(path); } -void Entity::SetIsClip(bool is_clip) { - is_clip_ = is_clip; -} - -bool Entity::IsClip() const { - return is_clip_; -} - void Entity::SetContents(std::shared_ptr contents) { contents_ = std::move(contents); } diff --git a/engine/src/flutter/impeller/entity/entity.h b/engine/src/flutter/impeller/entity/entity.h index 4ee9bf2e26..eeb0dd007f 100644 --- a/engine/src/flutter/impeller/entity/entity.h +++ b/engine/src/flutter/impeller/entity/entity.h @@ -23,22 +23,10 @@ class Entity { void SetTransformation(const Matrix& transformation); - const Color& GetStrokeColor() const; - - void SetStrokeColor(const Color& strokeColor); - - double GetStrokeSize() const; - - void SetStrokeSize(double strokeSize); - const Path& GetPath() const; void SetPath(Path path); - void SetIsClip(bool is_clip); - - bool IsClip() const; - void SetContents(std::shared_ptr contents); const std::shared_ptr& GetContents() const; @@ -47,9 +35,6 @@ class Entity { Matrix transformation_; std::shared_ptr contents_; Path path_; - Color stroke_color_; - double stroke_size_ = 1.0; - bool is_clip_ = false; }; } // namespace impeller diff --git a/engine/src/flutter/impeller/entity/shaders/solid_stroke.vert b/engine/src/flutter/impeller/entity/shaders/solid_stroke.vert index 696c039801..896fb56599 100644 --- a/engine/src/flutter/impeller/entity/shaders/solid_stroke.vert +++ b/engine/src/flutter/impeller/entity/shaders/solid_stroke.vert @@ -17,6 +17,7 @@ in vec2 vertex_normal; out vec4 stroke_color; void main() { + // Push one vertex by the half stroke size along the normal vector. vec2 offset = vertex_normal * vec2(stroke_info.size * 0.5); gl_Position = frame_info.mvp * vec4(vertex_position + offset, 0.0, 1.0); stroke_color = stroke_info.color;