From c99c1e532de3b4e86a4ab0676cb0d9aaf734b207 Mon Sep 17 00:00:00 2001 From: Alexander Biggs Date: Tue, 24 May 2022 13:56:21 -0700 Subject: [PATCH] [fuchsia] Fix bad DCHECKs. (flutter/engine#33593) We didn't catch these because the --unopt build was broken for about a year and not well-tested. The --unopt build was recently repaired in https://github.com/flutter/engine/pull/32502. --- .../platform/fuchsia/flutter/software_surface_producer.cc | 4 ++-- .../shell/platform/fuchsia/flutter/vulkan_surface_pool.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/software_surface_producer.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/software_surface_producer.cc index 370307c227..4246ed5653 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/software_surface_producer.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/software_surface_producer.cc @@ -55,13 +55,13 @@ SoftwareSurfaceProducer::SoftwareSurfaceProducer( sysmem_allocator_.NewRequest().TakeChannel().release()); sysmem_allocator_->SetDebugClientInfo(GetCurrentProcessName(), GetCurrentProcessId()); - FML_DCHECK(status != ZX_OK); + FML_DCHECK(status == ZX_OK); if (!scenic_session_) { status = fdio_service_connect( "/svc/fuchsia.ui.composition.Allocator", flatland_allocator_.NewRequest().TakeChannel().release()); - FML_DCHECK(status != ZX_OK); + FML_DCHECK(status == ZX_OK); } valid_ = true; diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_pool.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_pool.cc index ae83ff974a..ce6fa2e03b 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_pool.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/vulkan_surface_pool.cc @@ -42,13 +42,13 @@ VulkanSurfacePool::VulkanSurfacePool(vulkan::VulkanProvider& vulkan_provider, sysmem_allocator_.NewRequest().TakeChannel().release()); sysmem_allocator_->SetDebugClientInfo(GetCurrentProcessName(), GetCurrentProcessId()); - FML_DCHECK(status != ZX_OK); + FML_DCHECK(status == ZX_OK); if (!scenic_session_) { status = fdio_service_connect( "/svc/fuchsia.ui.composition.Allocator", flatland_allocator_.NewRequest().TakeChannel().release()); - FML_DCHECK(status != ZX_OK); + FML_DCHECK(status == ZX_OK); } }