Skip to content

Commit 5419f70

Browse files
authored
Remove GetExternalViewEmbedder from surface (flutter#22272)
This decouples surfaces from view embedders.
1 parent f95df42 commit 5419f70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+19
-220
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ FILE: ../../../flutter/shell/common/vsync_waiter_fallback.cc
667667
FILE: ../../../flutter/shell/common/vsync_waiter_fallback.h
668668
FILE: ../../../flutter/shell/common/vsync_waiters_test.cc
669669
FILE: ../../../flutter/shell/common/vsync_waiters_test.h
670-
FILE: ../../../flutter/shell/gpu/gpu_surface_delegate.h
671670
FILE: ../../../flutter/shell/gpu/gpu_surface_gl.cc
672671
FILE: ../../../flutter/shell/gpu/gpu_surface_gl.h
673672
FILE: ../../../flutter/shell/gpu/gpu_surface_gl_delegate.cc

flow/surface.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ Surface::Surface() = default;
1010

1111
Surface::~Surface() = default;
1212

13-
flutter::ExternalViewEmbedder* Surface::GetExternalViewEmbedder() {
14-
return nullptr;
15-
}
16-
1713
std::unique_ptr<GLContextResult> Surface::MakeRenderContextCurrent() {
1814
return std::make_unique<GLContextDefaultResult>(true);
1915
}

flow/surface.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class Surface {
2929

3030
virtual GrDirectContext* GetContext() = 0;
3131

32-
virtual flutter::ExternalViewEmbedder* GetExternalViewEmbedder();
33-
3432
virtual std::unique_ptr<GLContextResult> MakeRenderContextCurrent();
3533

3634
virtual bool ClearRenderContext();

shell/common/shell_test_platform_view_gl.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,5 @@ ShellTestPlatformViewGL::GetGLProcResolver() const {
7979
};
8080
}
8181

82-
// |GPUSurfaceGLDelegate|
83-
ExternalViewEmbedder* ShellTestPlatformViewGL::GetExternalViewEmbedder() {
84-
return shell_test_external_view_embedder_.get();
85-
}
86-
8782
} // namespace testing
8883
} // namespace flutter

shell/common/shell_test_platform_view_gl.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ class ShellTestPlatformViewGL : public ShellTestPlatformView,
6464
// |GPUSurfaceGLDelegate|
6565
GLProcResolver GetGLProcResolver() const override;
6666

67-
// |GPUSurfaceGLDelegate|
68-
ExternalViewEmbedder* GetExternalViewEmbedder() override;
69-
7067
FML_DISALLOW_COPY_AND_ASSIGN(ShellTestPlatformViewGL);
7168
};
7269

shell/common/shell_test_platform_view_vulkan.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,5 @@ SkMatrix ShellTestPlatformViewVulkan::OffScreenSurface::GetRootTransformation()
198198
return matrix;
199199
}
200200

201-
flutter::ExternalViewEmbedder*
202-
ShellTestPlatformViewVulkan::OffScreenSurface::GetExternalViewEmbedder() {
203-
return shell_test_external_view_embedder_.get();
204-
}
205-
206201
} // namespace testing
207202
} // namespace flutter

shell/common/shell_test_platform_view_vulkan.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ class ShellTestPlatformViewVulkan : public ShellTestPlatformView {
4747
// |Surface|
4848
GrDirectContext* GetContext() override;
4949

50-
flutter::ExternalViewEmbedder* GetExternalViewEmbedder() override;
51-
5250
private:
5351
bool valid_;
5452
fml::RefPtr<vulkan::VulkanProcTable> vk_;

shell/gpu/BUILD.gn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ gpu_common_deps = [
1616

1717
source_set("gpu_surface_software") {
1818
sources = [
19-
"gpu_surface_delegate.h",
2019
"gpu_surface_software.cc",
2120
"gpu_surface_software.h",
2221
"gpu_surface_software_delegate.cc",
@@ -28,7 +27,6 @@ source_set("gpu_surface_software") {
2827

2928
source_set("gpu_surface_gl") {
3029
sources = [
31-
"gpu_surface_delegate.h",
3230
"gpu_surface_gl.cc",
3331
"gpu_surface_gl.h",
3432
"gpu_surface_gl_delegate.cc",
@@ -40,7 +38,6 @@ source_set("gpu_surface_gl") {
4038

4139
source_set("gpu_surface_vulkan") {
4240
sources = [
43-
"gpu_surface_delegate.h",
4441
"gpu_surface_vulkan.cc",
4542
"gpu_surface_vulkan.h",
4643
"gpu_surface_vulkan_delegate.cc",
@@ -52,7 +49,6 @@ source_set("gpu_surface_vulkan") {
5249

5350
source_set("gpu_surface_metal") {
5451
sources = [
55-
"gpu_surface_delegate.h",
5652
"gpu_surface_metal.h",
5753
"gpu_surface_metal.mm",
5854
]

shell/gpu/gpu_surface_delegate.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

shell/gpu/gpu_surface_gl.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,6 @@ GrDirectContext* GPUSurfaceGL::GetContext() {
333333
return context_.get();
334334
}
335335

336-
// |Surface|
337-
flutter::ExternalViewEmbedder* GPUSurfaceGL::GetExternalViewEmbedder() {
338-
return delegate_->GetExternalViewEmbedder();
339-
}
340-
341336
// |Surface|
342337
std::unique_ptr<GLContextResult> GPUSurfaceGL::MakeRenderContextCurrent() {
343338
return delegate_->GLContextMakeCurrent();

0 commit comments

Comments
 (0)