Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clang tidy
  • Loading branch information
jonahwilliams committed Mar 27, 2024
commit 5fbc9532abe583083f0bfa222cea44fe0585cae7
6 changes: 4 additions & 2 deletions impeller/entity/geometry/fill_path_geometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ GeometryResult FillPathGeometry::GetPositionBuffer(
RenderPass& pass) const {
auto& host_buffer = renderer.GetTransientsBuffer();

if (path_.GetBoundingBox()->IsEmpty()) {
const auto& bounding_box = path_.GetBoundingBox();
if (bounding_box.has_value() && bounding_box->IsEmpty()) {
return GeometryResult{
.type = PrimitiveType::kTriangle,
.vertex_buffer =
Expand Down Expand Up @@ -93,7 +94,8 @@ GeometryResult FillPathGeometry::GetPositionUVBuffer(
RenderPass& pass) const {
using VS = TextureFillVertexShader;

if (path_.GetBoundingBox()->IsEmpty()) {
const auto& bounding_box = path_.GetBoundingBox();
if (bounding_box.has_value() && bounding_box->IsEmpty()) {
return GeometryResult{
.type = PrimitiveType::kTriangle,
.vertex_buffer =
Expand Down
4 changes: 3 additions & 1 deletion impeller/tessellator/tessellator_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ TEST(TessellatorTest, TessellatorBuilderReturnsCorrectResultStatus) {
// Zero points.
{
Tessellator t;
auto path = PathBuilder{}.TakePath(FillType::kOdd);
auto path = PathBuilder{}
.AddRect(Rect::MakeLTRB(0, 0, 100, 100))
.TakePath(FillType::kOdd);
Tessellator::Result result = t.Tessellate(
path, 1.0f,
[](const float* vertices, size_t vertices_count,
Expand Down