From 66d85bceb7328450bf071111c9d859292b5d95f6 Mon Sep 17 00:00:00 2001 From: David Worsham Date: Tue, 9 Jun 2020 16:03:01 -0700 Subject: [PATCH] Move Surface and friends to flow/ (#18938) --- ci/licenses_golden/licenses_flutter | 16 +++--- flow/BUILD.gn | 10 +++- flow/embedded_views.h | 2 +- {shell/common => flow}/gl_context_switch.cc | 8 ++- {shell/common => flow}/gl_context_switch.h | 57 +++++++++---------- .../gl_context_switch_unittests.cc | 6 +- {shell/common => flow}/surface.cc | 2 +- {shell/common => flow}/surface.h | 8 +-- {shell/common => flow}/surface_frame.cc | 2 +- {shell/common => flow}/surface_frame.h | 12 ++-- .../testing}/gl_context_switch_test.cc | 0 .../testing}/gl_context_switch_test.h | 4 +- shell/common/BUILD.gn | 21 ------- shell/common/platform_view.h | 2 +- shell/common/rasterizer.h | 2 +- shell/common/shell.h | 2 +- .../common/shell_test_platform_view_vulkan.cc | 1 - shell/gpu/BUILD.gn | 1 - shell/gpu/gpu_surface_gl.h | 4 +- shell/gpu/gpu_surface_gl_delegate.h | 2 +- shell/gpu/gpu_surface_metal.h | 2 +- shell/gpu/gpu_surface_software.h | 2 +- shell/gpu/gpu_surface_vulkan.h | 2 +- shell/platform/android/android_surface.h | 2 +- shell/platform/darwin/ios/ios_context.h | 2 +- shell/platform/darwin/ios/ios_surface.h | 2 +- .../darwin/ios/ios_switchable_gl_context.h | 2 +- shell/platform/embedder/embedder_surface.h | 2 +- shell/platform/fuchsia/flutter/BUILD.gn | 1 + shell/platform/fuchsia/flutter/surface.h | 2 +- 30 files changed, 84 insertions(+), 97 deletions(-) rename {shell/common => flow}/gl_context_switch.cc (95%) rename {shell/common => flow}/gl_context_switch.h (62%) rename {shell/common => flow}/gl_context_switch_unittests.cc (79%) rename {shell/common => flow}/surface.cc (92%) rename {shell/common => flow}/surface.h (83%) rename {shell/common => flow}/surface_frame.cc (97%) rename {shell/common => flow}/surface_frame.h (79%) rename {shell/common => flow/testing}/gl_context_switch_test.cc (100%) rename {shell/common => flow/testing}/gl_context_switch_test.h (96%) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 1dd07b924becc..1d205c33f2641 100755 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -28,6 +28,9 @@ FILE: ../../../flutter/flow/compositor_context.cc FILE: ../../../flutter/flow/compositor_context.h FILE: ../../../flutter/flow/embedded_views.cc FILE: ../../../flutter/flow/embedded_views.h +FILE: ../../../flutter/flow/gl_context_switch.cc +FILE: ../../../flutter/flow/gl_context_switch.h +FILE: ../../../flutter/flow/gl_context_switch_unittests.cc FILE: ../../../flutter/flow/instrumentation.cc FILE: ../../../flutter/flow/instrumentation.h FILE: ../../../flutter/flow/layers/backdrop_filter_layer.cc @@ -102,6 +105,10 @@ FILE: ../../../flutter/flow/scene_update_context.h FILE: ../../../flutter/flow/skia_gpu_object.cc FILE: ../../../flutter/flow/skia_gpu_object.h FILE: ../../../flutter/flow/skia_gpu_object_unittests.cc +FILE: ../../../flutter/flow/surface.cc +FILE: ../../../flutter/flow/surface.h +FILE: ../../../flutter/flow/surface_frame.cc +FILE: ../../../flutter/flow/surface_frame.h FILE: ../../../flutter/flow/texture.cc FILE: ../../../flutter/flow/texture.h FILE: ../../../flutter/flow/texture_unittests.cc @@ -576,11 +583,6 @@ FILE: ../../../flutter/shell/common/engine.cc FILE: ../../../flutter/shell/common/engine.h FILE: ../../../flutter/shell/common/fixtures/shell_test.dart FILE: ../../../flutter/shell/common/fixtures/shelltest_screenshot.png -FILE: ../../../flutter/shell/common/gl_context_switch.cc -FILE: ../../../flutter/shell/common/gl_context_switch.h -FILE: ../../../flutter/shell/common/gl_context_switch_test.cc -FILE: ../../../flutter/shell/common/gl_context_switch_test.h -FILE: ../../../flutter/shell/common/gl_context_switch_unittests.cc FILE: ../../../flutter/shell/common/input_events_unittests.cc FILE: ../../../flutter/shell/common/isolate_configuration.cc FILE: ../../../flutter/shell/common/isolate_configuration.h @@ -616,10 +618,6 @@ FILE: ../../../flutter/shell/common/shell_test_platform_view_vulkan.h FILE: ../../../flutter/shell/common/shell_unittests.cc FILE: ../../../flutter/shell/common/skia_event_tracer_impl.cc FILE: ../../../flutter/shell/common/skia_event_tracer_impl.h -FILE: ../../../flutter/shell/common/surface.cc -FILE: ../../../flutter/shell/common/surface.h -FILE: ../../../flutter/shell/common/surface_frame.cc -FILE: ../../../flutter/shell/common/surface_frame.h FILE: ../../../flutter/shell/common/switches.cc FILE: ../../../flutter/shell/common/switches.h FILE: ../../../flutter/shell/common/thread_host.cc diff --git a/flow/BUILD.gn b/flow/BUILD.gn index d1fd1a5e740a6..a8c3592ccecbf 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -14,6 +14,8 @@ source_set("flow") { "compositor_context.h", "embedded_views.cc", "embedded_views.h", + "gl_context_switch.cc", + "gl_context_switch.h", "instrumentation.cc", "instrumentation.h", "layers/backdrop_filter_layer.cc", @@ -62,6 +64,10 @@ source_set("flow") { "rtree.h", "skia_gpu_object.cc", "skia_gpu_object.h", + "surface.cc", + "surface.h", + "surface_frame.cc", + "surface_frame.h", "texture.cc", "texture.h", ] @@ -73,7 +79,6 @@ source_set("flow") { deps = [ "//flutter/common", "//flutter/fml", - "//flutter/shell/common:common_standalone", "//third_party/skia", ] @@ -103,6 +108,8 @@ source_set("flow_testing") { testonly = true sources = [ + "testing/gl_context_switch_test.cc", + "testing/gl_context_switch_test.h", "testing/layer_test.h", "testing/mock_layer.cc", "testing/mock_layer.h", @@ -126,6 +133,7 @@ executable("flow_unittests") { "flow_run_all_unittests.cc", "flow_test_utils.cc", "flow_test_utils.h", + "gl_context_switch_unittests.cc", "layers/backdrop_filter_layer_unittests.cc", "layers/clip_path_layer_unittests.cc", "layers/clip_rect_layer_unittests.cc", diff --git a/flow/embedded_views.h b/flow/embedded_views.h index 59ffdf453bc5d..8bbef5a0a3f4d 100644 --- a/flow/embedded_views.h +++ b/flow/embedded_views.h @@ -7,9 +7,9 @@ #include +#include "flutter/flow/surface_frame.h" #include "flutter/fml/memory/ref_counted.h" #include "flutter/fml/raster_thread_merger.h" -#include "flutter/shell/common/surface_frame.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPoint.h" diff --git a/shell/common/gl_context_switch.cc b/flow/gl_context_switch.cc similarity index 95% rename from shell/common/gl_context_switch.cc rename to flow/gl_context_switch.cc index dae9c310811ff..bace0ebee4698 100644 --- a/shell/common/gl_context_switch.cc +++ b/flow/gl_context_switch.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gl_context_switch.h" +#include "flutter/flow/gl_context_switch.h" namespace flutter { @@ -11,16 +11,20 @@ SwitchableGLContext::SwitchableGLContext() = default; SwitchableGLContext::~SwitchableGLContext() = default; GLContextResult::GLContextResult() = default; + GLContextResult::~GLContextResult() = default; + GLContextResult::GLContextResult(bool static_result) : result_(static_result){}; + bool GLContextResult::GetResult() { return result_; }; -GLContextDefaultResult::~GLContextDefaultResult() = default; GLContextDefaultResult::GLContextDefaultResult(bool static_result) : GLContextResult(static_result){}; +GLContextDefaultResult::~GLContextDefaultResult() = default; + GLContextSwitch::GLContextSwitch(std::unique_ptr context) : context_(std::move(context)) { FML_CHECK(context_ != nullptr); diff --git a/shell/common/gl_context_switch.h b/flow/gl_context_switch.h similarity index 62% rename from shell/common/gl_context_switch.h rename to flow/gl_context_switch.h index daec16fdbc0ce..35976f7325f23 100644 --- a/shell/common/gl_context_switch.h +++ b/flow/gl_context_switch.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef FLUTTER_SHELL_COMMON_GL_CONTEXT_SWITCH_H_ -#define FLUTTER_SHELL_COMMON_GL_CONTEXT_SWITCH_H_ +#ifndef FLUTTER_FLOW_GL_CONTEXT_SWITCH_H_ +#define FLUTTER_FLOW_GL_CONTEXT_SWITCH_H_ #include #include @@ -14,42 +14,39 @@ namespace flutter { -//------------------------------------------------------------------------------ -/// An abstract class represents a gl context that can be switched by -/// GLContextSwitch -/// -/// The subclass should wrap a "Context" object inside this class. For example, -/// in iOS while using GL rendering surface, the subclass should wrap an -/// |EAGLContext|. +// This interface represents a gl context that can be switched by +// |GLContextSwitch|. +// +// The implementation should wrap a "Context" object inside this class. For +// example, in iOS while using a GL rendering surface, the implementation should +// wrap an |EAGLContext|. class SwitchableGLContext { public: - //------------------------------------------------------------------------------ - /// Implement this to set the context wrapped by this |SwitchableGLContext| - /// object to the current context. - virtual bool SetCurrent() = 0; - - //------------------------------------------------------------------------------ - /// Implement this to remove the context wrapped by this |SwitchableGLContext| - /// object from current context; - virtual bool RemoveCurrent() = 0; - SwitchableGLContext(); virtual ~SwitchableGLContext(); + // Implement this to set the context wrapped by this |SwitchableGLContext| + // object to the current context. + virtual bool SetCurrent() = 0; + + // Implement this to remove the context wrapped by this |SwitchableGLContext| + // object from current context; + virtual bool RemoveCurrent() = 0; + FML_DISALLOW_COPY_AND_ASSIGN(SwitchableGLContext); }; -//------------------------------------------------------------------------------ -/// Represents the result of setting a gl context. -/// This class exists because context results are used in places applies to all -/// the platforms. On certain platforms(for example lower end iOS devices that -/// uses gl), a |GLContextSwitch| is required to protect flutter's gl contect -/// from being polluted by other programs(embedded platform views). A -/// |GLContextSwitch| is a subclass of |GLContextResult|, which can be returned -/// on platforms that requires context switching. A |GLContextDefaultResult| is -/// also a subclass of |GLContextResult|, which can be returned on platforms -/// that doesn't require context switching. +// Represents the result of setting a gl context. +// +// This class exists because context results are used in places applies to all +// the platforms. On certain platforms(for example lower end iOS devices that +// uses gl), a |GLContextSwitch| is required to protect flutter's gl contect +// from being polluted by other programs(embedded platform views). A +// |GLContextSwitch| is a subclass of |GLContextResult|, which can be returned +// on platforms that requires context switching. A |GLContextDefaultResult| is +// also a subclass of |GLContextResult|, which can be returned on platforms +// that doesn't require context switching. class GLContextResult { public: GLContextResult(); @@ -114,4 +111,4 @@ class GLContextSwitch final : public GLContextResult { } // namespace flutter -#endif +#endif // FLUTTER_FLOW_GL_CONTEXT_SWITCH_H_ diff --git a/shell/common/gl_context_switch_unittests.cc b/flow/gl_context_switch_unittests.cc similarity index 79% rename from shell/common/gl_context_switch_unittests.cc rename to flow/gl_context_switch_unittests.cc index bb5f761b8684e..ea0c8934bfb51 100644 --- a/shell/common/gl_context_switch_unittests.cc +++ b/flow/gl_context_switch_unittests.cc @@ -7,14 +7,14 @@ #include #include -#include "flutter/shell/common/gl_context_switch.h" -#include "gl_context_switch_test.h" +#include "flutter/flow/gl_context_switch.h" +#include "flutter/flow/testing/gl_context_switch_test.h" #include "gtest/gtest.h" namespace flutter { namespace testing { -TEST_F(GLContextSwitchTest, SwitchKeepsContextCurrentWhileInScope) { +TEST(GLContextSwitchTest, SwitchKeepsContextCurrentWhileInScope) { { auto test_gl_context = std::make_unique(0); auto context_switch = GLContextSwitch(std::move(test_gl_context)); diff --git a/shell/common/surface.cc b/flow/surface.cc similarity index 92% rename from shell/common/surface.cc rename to flow/surface.cc index 95ed2afbdf51a..a19ab9afec860 100644 --- a/shell/common/surface.cc +++ b/flow/surface.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/common/surface.h" +#include "flutter/flow/surface.h" namespace flutter { diff --git a/shell/common/surface.h b/flow/surface.h similarity index 83% rename from shell/common/surface.h rename to flow/surface.h index 708a35595e73c..619669999597f 100644 --- a/shell/common/surface.h +++ b/flow/surface.h @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef FLUTTER_SHELL_COMMON_SURFACE_H_ -#define FLUTTER_SHELL_COMMON_SURFACE_H_ +#ifndef FLUTTER_FLOW_SURFACE_H_ +#define FLUTTER_FLOW_SURFACE_H_ #include #include "flutter/flow/compositor_context.h" #include "flutter/flow/embedded_views.h" +#include "flutter/flow/surface_frame.h" #include "flutter/fml/macros.h" -#include "flutter/shell/common/surface_frame.h" namespace flutter { @@ -39,4 +39,4 @@ class Surface { } // namespace flutter -#endif // FLUTTER_SHELL_COMMON_SURFACE_H_ +#endif // FLUTTER_FLOW_SURFACE_H_ diff --git a/shell/common/surface_frame.cc b/flow/surface_frame.cc similarity index 97% rename from shell/common/surface_frame.cc rename to flow/surface_frame.cc index b08fae0eb3ef9..bd49326782649 100644 --- a/shell/common/surface_frame.cc +++ b/flow/surface_frame.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/common/surface_frame.h" +#include "flutter/flow/surface_frame.h" #include "flutter/fml/logging.h" namespace flutter { diff --git a/shell/common/surface_frame.h b/flow/surface_frame.h similarity index 79% rename from shell/common/surface_frame.h rename to flow/surface_frame.h index 8e5e56bd9e729..d2326508c9c84 100644 --- a/shell/common/surface_frame.h +++ b/flow/surface_frame.h @@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef FLUTTER_SHELL_COMMON_SURFACE_FRAME_H_ -#define FLUTTER_SHELL_COMMON_SURFACE_FRAME_H_ +#ifndef FLUTTER_FLOW_SURFACE_FRAME_H_ +#define FLUTTER_FLOW_SURFACE_FRAME_H_ #include +#include "flutter/flow/gl_context_switch.h" #include "flutter/fml/macros.h" -#include "flutter/shell/common/gl_context_switch.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkSurface.h" namespace flutter { -/// Represents a Frame that has been fully configured for the underlying client -/// rendering API. A frame may only be submitted once. +// This class represents a frame that has been fully configured for the +// underlying client rendering API. A frame may only be submitted once. class SurfaceFrame { public: using SubmitCallback = @@ -56,4 +56,4 @@ class SurfaceFrame { } // namespace flutter -#endif // FLUTTER_SHELL_COMMON_SURFACE_FRAME_H_ +#endif // FLUTTER_FLOW_SURFACE_FRAME_H_ diff --git a/shell/common/gl_context_switch_test.cc b/flow/testing/gl_context_switch_test.cc similarity index 100% rename from shell/common/gl_context_switch_test.cc rename to flow/testing/gl_context_switch_test.cc diff --git a/shell/common/gl_context_switch_test.h b/flow/testing/gl_context_switch_test.h similarity index 96% rename from shell/common/gl_context_switch_test.h rename to flow/testing/gl_context_switch_test.h index 38b4fb7cd1006..f65b475d021e9 100644 --- a/shell/common/gl_context_switch_test.h +++ b/flow/testing/gl_context_switch_test.h @@ -5,7 +5,7 @@ #ifndef FLUTTER_SHELL_RENDERER_CONTEXT_TEST_H_ #define FLUTTER_SHELL_RENDERER_CONTEXT_TEST_H_ -#include "gl_context_switch.h" +#include "flutter/flow/gl_context_switch.h" #include "gtest/gtest.h" namespace flutter { @@ -43,6 +43,8 @@ class TestSwitchableGLContext : public SwitchableGLContext { FML_DISALLOW_COPY_AND_ASSIGN(TestSwitchableGLContext); }; + } // namespace testing } // namespace flutter + #endif // FLUTTER_SHELL_RENDERER_CONTEXT_TEST_H_ diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 2a11faa0e64d6..71eac2a2dcc13 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -105,8 +105,6 @@ source_set("common") { "shell_io_manager.h", "skia_event_tracer_impl.cc", "skia_event_tracer_impl.h", - "surface.cc", - "surface.h", "switches.cc", "switches.h", "thread_host.cc", @@ -118,7 +116,6 @@ source_set("common") { ] deps = [ - ":common_standalone", "//flutter/assets", "//flutter/common", "//flutter/flow", @@ -140,20 +137,6 @@ source_set("common") { public_configs = [ "//flutter:config" ] } -source_set("common_standalone") { - sources = [ - "gl_context_switch.cc", - "gl_context_switch.h", - "surface_frame.cc", - "surface_frame.h", - ] - - deps = [ - "//flutter/fml", - "//third_party/skia", - ] -} - template("shell_host_executable") { executable(target_name) { testonly = true @@ -203,9 +186,6 @@ if (enable_unittests) { testonly = true sources = [ - "gl_context_switch_test.cc", - "gl_context_switch_test.h", - "gl_context_switch_unittests.cc", "shell_test.cc", "shell_test.h", "shell_test_external_view_embedder.cc", @@ -217,7 +197,6 @@ if (enable_unittests) { ] public_deps = [ - ":common_standalone", "//flutter/flow", "//flutter/fml/dart", "//flutter/lib/ui", diff --git a/shell/common/platform_view.h b/shell/common/platform_view.h index 15d3edac4b210..4e226dab30901 100644 --- a/shell/common/platform_view.h +++ b/shell/common/platform_view.h @@ -8,6 +8,7 @@ #include #include "flutter/common/task_runners.h" +#include "flutter/flow/surface.h" #include "flutter/flow/texture.h" #include "flutter/fml/macros.h" #include "flutter/fml/memory/weak_ptr.h" @@ -18,7 +19,6 @@ #include "flutter/lib/ui/window/pointer_data_packet_converter.h" #include "flutter/lib/ui/window/viewport_metrics.h" #include "flutter/shell/common/pointer_data_dispatcher.h" -#include "flutter/shell/common/surface.h" #include "flutter/shell/common/vsync_waiter.h" #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/gpu/GrContext.h" diff --git a/shell/common/rasterizer.h b/shell/common/rasterizer.h index 6e2b434430a8b..5fe34f4f584b6 100644 --- a/shell/common/rasterizer.h +++ b/shell/common/rasterizer.h @@ -12,6 +12,7 @@ #include "flutter/common/task_runners.h" #include "flutter/flow/compositor_context.h" #include "flutter/flow/layers/layer_tree.h" +#include "flutter/flow/surface.h" #include "flutter/fml/closure.h" #include "flutter/fml/memory/weak_ptr.h" #include "flutter/fml/raster_thread_merger.h" @@ -21,7 +22,6 @@ #include "flutter/fml/time/time_point.h" #include "flutter/lib/ui/snapshot_delegate.h" #include "flutter/shell/common/layer_tree_holder.h" -#include "flutter/shell/common/surface.h" namespace flutter { diff --git a/shell/common/shell.h b/shell/common/shell.h index b5f291b414a2d..1484104e9397e 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -12,6 +12,7 @@ #include "flutter/common/settings.h" #include "flutter/common/task_runners.h" +#include "flutter/flow/surface.h" #include "flutter/flow/texture.h" #include "flutter/fml/closure.h" #include "flutter/fml/macros.h" @@ -34,7 +35,6 @@ #include "flutter/shell/common/platform_view.h" #include "flutter/shell/common/rasterizer.h" #include "flutter/shell/common/shell_io_manager.h" -#include "flutter/shell/common/surface.h" namespace flutter { diff --git a/shell/common/shell_test_platform_view_vulkan.cc b/shell/common/shell_test_platform_view_vulkan.cc index 7d92053de6db5..7c91656789765 100644 --- a/shell/common/shell_test_platform_view_vulkan.cc +++ b/shell/common/shell_test_platform_view_vulkan.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "flutter/shell/common/shell_test_platform_view_vulkan.h" -#include "flutter/shell/common/gl_context_switch.h" #include "flutter/vulkan/vulkan_utilities.h" namespace flutter { diff --git a/shell/gpu/BUILD.gn b/shell/gpu/BUILD.gn index 1e5b0d1f3981c..2f91e20b43aee 100644 --- a/shell/gpu/BUILD.gn +++ b/shell/gpu/BUILD.gn @@ -11,7 +11,6 @@ gpu_common_deps = [ "//flutter/flow", "//flutter/fml", "//flutter/shell/common", - "//flutter/shell/common:common_standalone", "//third_party/skia", ] diff --git a/shell/gpu/gpu_surface_gl.h b/shell/gpu/gpu_surface_gl.h index b5bd4a1bf19e9..42152d98855ea 100644 --- a/shell/gpu/gpu_surface_gl.h +++ b/shell/gpu/gpu_surface_gl.h @@ -9,10 +9,10 @@ #include #include "flutter/flow/embedded_views.h" +#include "flutter/flow/gl_context_switch.h" +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" #include "flutter/fml/memory/weak_ptr.h" -#include "flutter/shell/common/gl_context_switch.h" -#include "flutter/shell/common/surface.h" #include "flutter/shell/gpu/gpu_surface_gl_delegate.h" #include "third_party/skia/include/gpu/GrContext.h" diff --git a/shell/gpu/gpu_surface_gl_delegate.h b/shell/gpu/gpu_surface_gl_delegate.h index aaca9269a14cc..9fb9765ac9be2 100644 --- a/shell/gpu/gpu_surface_gl_delegate.h +++ b/shell/gpu/gpu_surface_gl_delegate.h @@ -6,8 +6,8 @@ #define FLUTTER_SHELL_GPU_GPU_SURFACE_GL_DELEGATE_H_ #include "flutter/flow/embedded_views.h" +#include "flutter/flow/gl_context_switch.h" #include "flutter/fml/macros.h" -#include "flutter/shell/common/gl_context_switch.h" #include "flutter/shell/gpu/gpu_surface_delegate.h" #include "third_party/skia/include/core/SkMatrix.h" #include "third_party/skia/include/gpu/gl/GrGLInterface.h" diff --git a/shell/gpu/gpu_surface_metal.h b/shell/gpu/gpu_surface_metal.h index 86715960a055e..a55c3f1e9daf5 100644 --- a/shell/gpu/gpu_surface_metal.h +++ b/shell/gpu/gpu_surface_metal.h @@ -7,9 +7,9 @@ #include +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" -#include "flutter/shell/common/surface.h" #include "flutter/shell/gpu/gpu_surface_delegate.h" #include "third_party/skia/include/gpu/GrContext.h" diff --git a/shell/gpu/gpu_surface_software.h b/shell/gpu/gpu_surface_software.h index a18f67ca8ce12..8c122f42fb32c 100644 --- a/shell/gpu/gpu_surface_software.h +++ b/shell/gpu/gpu_surface_software.h @@ -5,9 +5,9 @@ #ifndef FLUTTER_SHELL_GPU_GPU_SURFACE_SOFTWARE_H_ #define FLUTTER_SHELL_GPU_GPU_SURFACE_SOFTWARE_H_ +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" #include "flutter/fml/memory/weak_ptr.h" -#include "flutter/shell/common/surface.h" #include "flutter/shell/gpu/gpu_surface_software_delegate.h" namespace flutter { diff --git a/shell/gpu/gpu_surface_vulkan.h b/shell/gpu/gpu_surface_vulkan.h index 1d876b7c493fa..eaf583686dabb 100644 --- a/shell/gpu/gpu_surface_vulkan.h +++ b/shell/gpu/gpu_surface_vulkan.h @@ -7,9 +7,9 @@ #include +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" #include "flutter/fml/memory/weak_ptr.h" -#include "flutter/shell/common/surface.h" #include "flutter/shell/gpu/gpu_surface_vulkan_delegate.h" #include "flutter/vulkan/vulkan_native_surface.h" #include "flutter/vulkan/vulkan_window.h" diff --git a/shell/platform/android/android_surface.h b/shell/platform/android/android_surface.h index 9c463c9907325..329b971adee24 100644 --- a/shell/platform/android/android_surface.h +++ b/shell/platform/android/android_surface.h @@ -7,11 +7,11 @@ #include +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" #include "flutter/fml/platform/android/jni_util.h" #include "flutter/fml/platform/android/jni_weak_ref.h" #include "flutter/shell/common/platform_view.h" -#include "flutter/shell/common/surface.h" #include "flutter/shell/platform/android/android_context.h" #include "flutter/shell/platform/android/android_native_window.h" #include "third_party/skia/include/core/SkSize.h" diff --git a/shell/platform/darwin/ios/ios_context.h b/shell/platform/darwin/ios/ios_context.h index ca834c1660f41..265d3563c2981 100644 --- a/shell/platform/darwin/ios/ios_context.h +++ b/shell/platform/darwin/ios/ios_context.h @@ -7,10 +7,10 @@ #include +#include "flutter/flow/gl_context_switch.h" #include "flutter/flow/texture.h" #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" -#include "flutter/shell/common/gl_context_switch.h" #include "flutter/shell/platform/darwin/common/framework/Headers/FlutterTexture.h" #include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" #include "third_party/skia/include/gpu/GrContext.h" diff --git a/shell/platform/darwin/ios/ios_surface.h b/shell/platform/darwin/ios/ios_surface.h index ac4ab2af1f2c1..fc795b0e62fb1 100644 --- a/shell/platform/darwin/ios/ios_surface.h +++ b/shell/platform/darwin/ios/ios_surface.h @@ -10,9 +10,9 @@ #include #include "flutter/flow/embedded_views.h" +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" -#include "flutter/shell/common/surface.h" @class CALayer; diff --git a/shell/platform/darwin/ios/ios_switchable_gl_context.h b/shell/platform/darwin/ios/ios_switchable_gl_context.h index 8f1aed11ddf9b..4043c9f6bde29 100644 --- a/shell/platform/darwin/ios/ios_switchable_gl_context.h +++ b/shell/platform/darwin/ios/ios_switchable_gl_context.h @@ -5,10 +5,10 @@ #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SWITCHABLE_GL_CONTEXT_H_ #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SWITCHABLE_GL_CONTEXT_H_ +#include "flutter/flow/gl_context_switch.h" #include "flutter/fml/macros.h" #include "flutter/fml/memory/thread_checker.h" #include "flutter/fml/memory/weak_ptr.h" -#include "flutter/shell/common/gl_context_switch.h" @class EAGLContext; diff --git a/shell/platform/embedder/embedder_surface.h b/shell/platform/embedder/embedder_surface.h index cda35e4b2f1f2..b937a55024de2 100644 --- a/shell/platform/embedder/embedder_surface.h +++ b/shell/platform/embedder/embedder_surface.h @@ -6,8 +6,8 @@ #define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_H_ #include "flutter/flow/embedded_views.h" +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" -#include "flutter/shell/common/surface.h" namespace flutter { diff --git a/shell/platform/fuchsia/flutter/BUILD.gn b/shell/platform/fuchsia/flutter/BUILD.gn index 9412b261331f7..53ffc29c0f8b8 100644 --- a/shell/platform/fuchsia/flutter/BUILD.gn +++ b/shell/platform/fuchsia/flutter/BUILD.gn @@ -315,6 +315,7 @@ executable("flutter_runner_unittests") { "//build/fuchsia/pkg:async-loop-default", "//build/fuchsia/pkg:scenic_cpp", "//build/fuchsia/pkg:sys_cpp_testing", + "//flutter/flow", "//flutter/lib/ui", "//flutter/runtime", "//flutter/shell/common", diff --git a/shell/platform/fuchsia/flutter/surface.h b/shell/platform/fuchsia/flutter/surface.h index c1ca54be1baad..4f5d482b3be95 100644 --- a/shell/platform/fuchsia/flutter/surface.h +++ b/shell/platform/fuchsia/flutter/surface.h @@ -5,9 +5,9 @@ #pragma once #include "compositor_context.h" +#include "flutter/flow/surface.h" #include "flutter/fml/macros.h" #include "flutter/fml/memory/weak_ptr.h" -#include "flutter/shell/common/surface.h" namespace flutter_runner {