[Fuchsia] Assert renders are only to the implicit view (flutter/engine#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
This commit is contained in:
Loïc Sharma
2024-03-21 14:09:04 -07:00
committed by GitHub
parent 454af9a350
commit 2526347a83

View File

@@ -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::BeginFrame(
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;