Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions shell/platform/darwin/ios/ios_surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class IOSSurface : public ExternalViewEmbedder {

std::shared_ptr<IOSContext> GetContext() const;

ExternalViewEmbedder* GetExternalViewEmbedderIfEnabled();

virtual bool IsValid() const = 0;

virtual void UpdateStorageSizeIfNecessary() = 0;
Expand Down
17 changes: 0 additions & 17 deletions shell/platform/darwin/ios/ios_surface.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@

namespace flutter {

// The name of the Info.plist flag to enable the embedded iOS views preview.
constexpr const char* kEmbeddedViewsPreview = "io.flutter.embedded_views_preview";

bool IsIosEmbeddedViewsPreviewEnabled() {
static bool preview_enabled =
[[[NSBundle mainBundle] objectForInfoDictionaryKey:@(kEmbeddedViewsPreview)] boolValue];
return preview_enabled;
}

std::unique_ptr<IOSSurface> IOSSurface::Create(
std::shared_ptr<IOSContext> context,
fml::scoped_nsobject<CALayer> layer,
Expand Down Expand Up @@ -75,14 +66,6 @@ bool IsIosEmbeddedViewsPreviewEnabled() {
return nullptr;
}

ExternalViewEmbedder* IOSSurface::GetExternalViewEmbedderIfEnabled() {
if (IsIosEmbeddedViewsPreviewEnabled()) {
return this;
} else {
return nullptr;
}
}

// |ExternalViewEmbedder|
void IOSSurface::CancelFrame() {
TRACE_EVENT0("flutter", "IOSSurface::CancelFrame");
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/darwin/ios/ios_surface_gl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

// |GPUSurfaceGLDelegate|
ExternalViewEmbedder* IOSSurfaceGL::GetExternalViewEmbedder() {
return GetExternalViewEmbedderIfEnabled();
return this;
}

} // namespace flutter
2 changes: 1 addition & 1 deletion shell/platform/darwin/ios/ios_surface_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

// |GPUSurfaceDelegate|
ExternalViewEmbedder* IOSSurfaceMetal::GetExternalViewEmbedder() {
return GetExternalViewEmbedderIfEnabled();
return this;
}

} // namespace flutter
2 changes: 1 addition & 1 deletion shell/platform/darwin/ios/ios_surface_software.mm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

// |GPUSurfaceSoftwareDelegate|
ExternalViewEmbedder* IOSSurfaceSoftware::GetExternalViewEmbedder() {
return GetExternalViewEmbedderIfEnabled();
return this;
}

} // namespace flutter
2 changes: 0 additions & 2 deletions testing/scenario_app/ios/Scenarios/Scenarios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>io.flutter.embedded_views_preview</key>
<true/>
</dict>
</plist>