Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
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
++
  • Loading branch information
jonahwilliams committed Apr 22, 2024
commit c5f80f086d1440be0ba28c7d9cb6c7a3b828fe6e
9 changes: 3 additions & 6 deletions impeller/aiks/canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -901,14 +901,12 @@ static bool UseColorSourceContents(
const std::shared_ptr<VerticesGeometry>& vertices,
const Paint& paint) {
// If there are no vertex color or texture coordinates. Or if there
// are vertex coordinates then only if the contents are an image or
// a solid color.
// are vertex coordinates but its just a color.
if (vertices->HasVertexColors()) {
return false;
}
if (vertices->HasTextureCoordinates() &&
(paint.color_source.GetType() == ColorSource::Type::kImage ||
paint.color_source.GetType() == ColorSource::Type::kColor)) {
(paint.color_source.GetType() == ColorSource::Type::kColor)) {
return true;
}
return !vertices->HasTextureCoordinates();
Expand All @@ -928,8 +926,7 @@ void Canvas::DrawVertices(const std::shared_ptr<VerticesGeometry>& vertices,
entity.SetTransform(GetCurrentTransform());
entity.SetBlendMode(paint.blend_mode);

// If there are no vertex color or texture coordinates. Or if there
// are vertex coordinates then only if the contents are an image.
// If there are no vertex color or texture coordinates.
if (UseColorSourceContents(vertices, paint)) {
entity.SetContents(CreateContentsForGeometryWithFilters(paint, vertices));
AddRenderEntityToCurrentPass(std::move(entity));
Expand Down