From c6d8bc3c8d2857d64d549c187136a5baddfdbcf9 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Sun, 11 Jul 2021 18:06:28 -0700 Subject: [PATCH] Zero initialize command primitive type --- engine/src/flutter/impeller/compositor/command.h | 2 +- engine/src/flutter/impeller/playground/playground.mm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/impeller/compositor/command.h b/engine/src/flutter/impeller/compositor/command.h index 1e0cd4a4a2f..f9b3b4f1ffb 100644 --- a/engine/src/flutter/impeller/compositor/command.h +++ b/engine/src/flutter/impeller/compositor/command.h @@ -33,7 +33,7 @@ struct Command { BufferView index_buffer; size_t index_count = 0u; std::string label; - PrimitiveType primitive_type; + PrimitiveType primitive_type = PrimitiveType::kTriangle; bool BindVertices(const VertexBuffer& buffer); diff --git a/engine/src/flutter/impeller/playground/playground.mm b/engine/src/flutter/impeller/playground/playground.mm index fabe1b71425..8b836e23985 100644 --- a/engine/src/flutter/impeller/playground/playground.mm +++ b/engine/src/flutter/impeller/playground/playground.mm @@ -193,6 +193,7 @@ std::shared_ptr Playground::CreateTextureForFixture( return nullptr; } texture->SetLabel(fixture_name); + auto uploaded = texture->SetContents(image.GetAllocation()->GetMapping(), image.GetAllocation()->GetSize()); if (!uploaded) {