Remove the view ID check in macOS/FlutterCompositor (flutter/engine#51852)

This PR removes the view ID check added in https://github.com/flutter/engine/pull/51738, which has been causing a test `FlutterEngineTest.CompositorIgnoresUnknownView`, added in https://github.com/flutter/engine/pull/51436, to fail.

This problem was missed by the CI because the test and the view ID check were added in two PRs recently and they were not using the latest engine to check.

The view ID check is not needed anyway, and is only a temporary check until the multiview support is landed.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
Tong Mu
2024-04-02 15:17:36 -07:00
committed by GitHub
parent d3cc586a58
commit bf68661eba

View File

@@ -54,10 +54,6 @@ bool FlutterCompositor::CreateBackingStore(const FlutterBackingStoreConfig* conf
bool FlutterCompositor::Present(FlutterViewId view_id,
const FlutterLayer** layers,
size_t layers_count) {
// TODO(dkwingsmt): The macOS embedder only supports rendering to the implicit
// view for now. As it supports adding more views, this assertion should be
// lifted. https://github.com/flutter/flutter/issues/142845
FML_DCHECK(view_id == kFlutterImplicitViewId);
FlutterView* view = [view_provider_ viewForId:view_id];
if (!view) {
return false;