From 8629ed8c3ff6265fe414955e906f074be8eb5dae Mon Sep 17 00:00:00 2001 From: mashixing Date: Tue, 28 Nov 2023 16:55:22 +0800 Subject: Fix assertion checks in libs/hwui/Mesh.cpp The original code contained assertions that checked `fICount` and `fIOffset`, which seem to be mistakenly copied from the Skia codebase. This commit corrects the assertions to properly reflect the variables used in the AOSP codebase, updating them to `mIndexCount` and `mIndexOffset` as intended. The correction ensures accurate runtime checks for the expected conditions and prevents compilation error due to undeclared identifier. Bug: 313566801 Change-Id: I1432598be14a6960d0dbe373e1ac997f5f5f8ee6 Signed-off-by: Shixing Ma --- libs/hwui/Mesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/hwui/Mesh.cpp') diff --git a/libs/hwui/Mesh.cpp b/libs/hwui/Mesh.cpp index e59bc9565a59..37a7d74330e9 100644 --- a/libs/hwui/Mesh.cpp +++ b/libs/hwui/Mesh.cpp @@ -90,8 +90,8 @@ std::tuple Mesh::validate() { FAIL_MESH_VALIDATE("%s mode requires at least %zu vertices but vertex count is %zu.", modeToStr(meshMode), min_vcount_for_mode(meshMode), mVertexCount); } - SkASSERT(!fICount); - SkASSERT(!fIOffset); + LOG_ALWAYS_FATAL_IF(mIndexCount != 0); + LOG_ALWAYS_FATAL_IF(mIndexOffset != 0); } if (!sm.ok()) { -- cgit v1.2.3-59-g8ed1b