[Fuchsia] Assert renders are only to the implicit view (#51559) Fuchsia does not support multiple view rendering yet. This asserts only the implicit view is rendered to, to mirror the existing Android and iOS assertion. Prepares for: 1. https://github.com/flutter/flutter/issues/144806 1. https://github.com/flutter/flutter/issues/142845 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
diff --git a/shell/platform/fuchsia/flutter/external_view_embedder.cc b/shell/platform/fuchsia/flutter/external_view_embedder.cc index 5900799..af50b42 100644 --- a/shell/platform/fuchsia/flutter/external_view_embedder.cc +++ b/shell/platform/fuchsia/flutter/external_view_embedder.cc
@@ -3,9 +3,11 @@ // found in the LICENSE file. #include "external_view_embedder.h" + #include <algorithm> #include <cstdint> +#include "flutter/common/constants.h" #include "flutter/fml/trace_event.h" #include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/core/SkSurface.h" @@ -115,6 +117,9 @@ void ExternalViewEmbedder::PrepareFlutterView(int64_t flutter_view_id, SkISize frame_size, double device_pixel_ratio) { + // Fuchsia only supports operating the implicit view for now. + FML_DCHECK(flutter_view_id == flutter::kFlutterImplicitViewId); + // Reset for new view. Reset(); frame_size_ = frame_size;