diff --git a/impeller/aiks/BUILD.gn b/impeller/aiks/BUILD.gn index 16df517cbf9b6..dc90d4344728c 100644 --- a/impeller/aiks/BUILD.gn +++ b/impeller/aiks/BUILD.gn @@ -61,7 +61,10 @@ impeller_component("aiks_unittests") { impeller_component("aiks_unittests_golden") { testonly = true - defines = [ "IMPELLER_GOLDEN_TESTS" ] + defines = [ + "IMPELLER_GOLDEN_TESTS", + "IMPELLER_ENABLE_VALIDATION=1", + ] sources = [ "aiks_unittests.cc" ] deps = [ diff --git a/impeller/base/validation.cc b/impeller/base/validation.cc index 5e2e3e76b512f..d3a7031622fef 100644 --- a/impeller/base/validation.cc +++ b/impeller/base/validation.cc @@ -39,7 +39,7 @@ std::ostream& ValidationLog::GetStream() { void ImpellerValidationBreak(const char* message) { // Nothing to do. Exists for the debugger. -#ifdef IMPELLER_DEBUG +#ifdef IMPELLER_ENABLE_VALIDATION std::stringstream stream; stream << "Break on '" << __FUNCTION__ << "' to inspect point of failure: " << message; diff --git a/impeller/base/validation.h b/impeller/base/validation.h index 60ed89df71909..efa1d98ef41c2 100644 --- a/impeller/base/validation.h +++ b/impeller/base/validation.h @@ -4,6 +4,12 @@ #pragma once +#ifndef IMPELLER_ENABLE_VALIDATION +#ifdef IMPELLER_DEBUG +#define IMPELLER_ENABLE_VALIDATION 1 +#endif +#endif + #include #include "flutter/fml/macros.h"