diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 93948761cd3b5..a6a76600ffa36 100755 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -21,6 +21,12 @@ FILE: ../../../flutter/benchmarking/benchmarking.cc FILE: ../../../flutter/benchmarking/benchmarking.h FILE: ../../../flutter/common/constants.h FILE: ../../../flutter/common/exported_symbols.sym +FILE: ../../../flutter/common/graphics/gl_context_switch.cc +FILE: ../../../flutter/common/graphics/gl_context_switch.h +FILE: ../../../flutter/common/graphics/persistent_cache.cc +FILE: ../../../flutter/common/graphics/persistent_cache.h +FILE: ../../../flutter/common/graphics/texture.cc +FILE: ../../../flutter/common/graphics/texture.h FILE: ../../../flutter/common/settings.cc FILE: ../../../flutter/common/settings.h FILE: ../../../flutter/common/task_runners.cc @@ -33,8 +39,6 @@ FILE: ../../../flutter/flow/embedded_views.h FILE: ../../../flutter/flow/flow_run_all_unittests.cc FILE: ../../../flutter/flow/flow_test_utils.cc FILE: ../../../flutter/flow/flow_test_utils.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 @@ -115,8 +119,6 @@ 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 FILE: ../../../flutter/flow/view_holder.cc FILE: ../../../flutter/flow/view_holder.h @@ -620,8 +622,6 @@ FILE: ../../../flutter/shell/common/engine_unittests.cc FILE: ../../../flutter/shell/common/fixtures/shell_test.dart FILE: ../../../flutter/shell/common/fixtures/shelltest_screenshot.png FILE: ../../../flutter/shell/common/input_events_unittests.cc -FILE: ../../../flutter/shell/common/persistent_cache.cc -FILE: ../../../flutter/shell/common/persistent_cache.h FILE: ../../../flutter/shell/common/persistent_cache_unittests.cc FILE: ../../../flutter/shell/common/pipeline.cc FILE: ../../../flutter/shell/common/pipeline.h diff --git a/common/graphics/BUILD.gn b/common/graphics/BUILD.gn new file mode 100644 index 0000000000000..5afc6cae533ed --- /dev/null +++ b/common/graphics/BUILD.gn @@ -0,0 +1,30 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//flutter/common/config.gni") +import("//flutter/testing/testing.gni") + +source_set("graphics") { + sources = [ + "gl_context_switch.cc", + "gl_context_switch.h", + "persistent_cache.cc", + "persistent_cache.h", + "texture.cc", + "texture.h", + ] + + # Heed caution when adding targets to the dependencies. This is a minimal + # target containing graphics sources that embedders can depend on. Any + # additions here could result in added app sizes across embeddings. + deps = [ + "//flutter/assets", + "//flutter/fml", + "//flutter/shell/version:version", + "//third_party/rapidjson", + "//third_party/skia", + ] + + public_configs = [ "//flutter:config" ] +} diff --git a/flow/gl_context_switch.cc b/common/graphics/gl_context_switch.cc similarity index 94% rename from flow/gl_context_switch.cc rename to common/graphics/gl_context_switch.cc index bace0ebee4698..71ab99c5654b8 100644 --- a/flow/gl_context_switch.cc +++ b/common/graphics/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 "flutter/flow/gl_context_switch.h" +#include "flutter/common/graphics/gl_context_switch.h" namespace flutter { diff --git a/flow/gl_context_switch.h b/common/graphics/gl_context_switch.h similarity index 95% rename from flow/gl_context_switch.h rename to common/graphics/gl_context_switch.h index 35976f7325f23..18710ce627a60 100644 --- a/flow/gl_context_switch.h +++ b/common/graphics/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_FLOW_GL_CONTEXT_SWITCH_H_ -#define FLUTTER_FLOW_GL_CONTEXT_SWITCH_H_ +#ifndef FLUTTER_COMMON_GRAPHICS_GL_CONTEXT_SWITCH_H_ +#define FLUTTER_COMMON_GRAPHICS_GL_CONTEXT_SWITCH_H_ #include #include @@ -111,4 +111,4 @@ class GLContextSwitch final : public GLContextResult { } // namespace flutter -#endif // FLUTTER_FLOW_GL_CONTEXT_SWITCH_H_ +#endif // FLUTTER_COMMON_GRAPHICS_GL_CONTEXT_SWITCH_H_ diff --git a/shell/common/persistent_cache.cc b/common/graphics/persistent_cache.cc similarity index 99% rename from shell/common/persistent_cache.cc rename to common/graphics/persistent_cache.cc index 3152631e3a493..e24509c4d72b9 100644 --- a/shell/common/persistent_cache.cc +++ b/common/graphics/persistent_cache.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/persistent_cache.h" +#include "flutter/common/graphics/persistent_cache.h" #include #include diff --git a/shell/common/persistent_cache.h b/common/graphics/persistent_cache.h similarity index 96% rename from shell/common/persistent_cache.h rename to common/graphics/persistent_cache.h index 1843501b969f3..8585b9d671c2e 100644 --- a/shell/common/persistent_cache.h +++ b/common/graphics/persistent_cache.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_PERSISTENT_CACHE_H_ -#define FLUTTER_SHELL_COMMON_PERSISTENT_CACHE_H_ +#ifndef FLUTTER_COMMON_GRAPHICS_PERSISTENT_CACHE_H_ +#define FLUTTER_COMMON_GRAPHICS_PERSISTENT_CACHE_H_ #include #include @@ -134,4 +134,4 @@ class PersistentCache : public GrContextOptions::PersistentCache { } // namespace flutter -#endif // FLUTTER_SHELL_COMMON_PERSISTENT_CACHE_H_ +#endif // FLUTTER_COMMON_GRAPHICS_PERSISTENT_CACHE_H_ diff --git a/flow/texture.cc b/common/graphics/texture.cc similarity index 96% rename from flow/texture.cc rename to common/graphics/texture.cc index c81314bf017fe..c5ad5fdf29af8 100644 --- a/flow/texture.cc +++ b/common/graphics/texture.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/flow/texture.h" +#include "flutter/common/graphics/texture.h" namespace flutter { diff --git a/flow/texture.h b/common/graphics/texture.h similarity index 92% rename from flow/texture.h rename to common/graphics/texture.h index dd136942d36ec..794194ae47d44 100644 --- a/flow/texture.h +++ b/common/graphics/texture.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_FLOW_TEXTURE_H_ -#define FLUTTER_FLOW_TEXTURE_H_ +#ifndef FLUTTER_COMMON_GRAPHICS_TEXTURE_H_ +#define FLUTTER_COMMON_GRAPHICS_TEXTURE_H_ #include @@ -74,4 +74,4 @@ class TextureRegistry { } // namespace flutter -#endif // FLUTTER_FLOW_TEXTURE_H_ +#endif // FLUTTER_COMMON_GRAPHICS_TEXTURE_H_ diff --git a/flow/BUILD.gn b/flow/BUILD.gn index f769ee405afd5..94b7827bb7e05 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -12,8 +12,6 @@ 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", @@ -66,14 +64,13 @@ source_set("flow") { "surface.h", "surface_frame.cc", "surface_frame.h", - "texture.cc", - "texture.h", ] public_configs = [ "//flutter:config" ] deps = [ "//flutter/common", + "//flutter/common/graphics", "//flutter/fml", "//third_party/skia", ] @@ -124,7 +121,10 @@ if (enable_unittests) { "//third_party/googletest:gtest", ] - deps = [ ":flow" ] + deps = [ + ":flow", + "//flutter/common/graphics", + ] } executable("flow_unittests") { @@ -167,6 +167,7 @@ if (enable_unittests) { ":flow", ":flow_fixtures", ":flow_testing", + "//flutter/common/graphics", "//flutter/fml", "//flutter/testing:skia", "//flutter/testing:testing_lib", diff --git a/flow/compositor_context.h b/flow/compositor_context.h index 7631e7e41ee2a..ca1bb662f68cf 100644 --- a/flow/compositor_context.h +++ b/flow/compositor_context.h @@ -8,10 +8,10 @@ #include #include +#include "flutter/common/graphics/texture.h" #include "flutter/flow/embedded_views.h" #include "flutter/flow/instrumentation.h" #include "flutter/flow/raster_cache.h" -#include "flutter/flow/texture.h" #include "flutter/fml/macros.h" #include "flutter/fml/raster_thread_merger.h" #include "third_party/skia/include/core/SkCanvas.h" diff --git a/flow/gl_context_switch_unittests.cc b/flow/gl_context_switch_unittests.cc index 916297912ba85..6d4acf2128102 100644 --- a/flow/gl_context_switch_unittests.cc +++ b/flow/gl_context_switch_unittests.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #define FML_USED_ON_EMBEDDER -#include "flutter/flow/gl_context_switch.h" +#include "flutter/common/graphics/gl_context_switch.h" #include #include diff --git a/flow/layers/layer.h b/flow/layers/layer.h index 0ce351db63b2f..0c7ef6568e6ce 100644 --- a/flow/layers/layer.h +++ b/flow/layers/layer.h @@ -8,10 +8,10 @@ #include #include +#include "flutter/common/graphics/texture.h" #include "flutter/flow/embedded_views.h" #include "flutter/flow/instrumentation.h" #include "flutter/flow/raster_cache.h" -#include "flutter/flow/texture.h" #include "flutter/fml/build_config.h" #include "flutter/fml/compiler_specific.h" #include "flutter/fml/logging.h" diff --git a/flow/layers/texture_layer.cc b/flow/layers/texture_layer.cc index 55e3ed3f16e3c..e5775149a8d7a 100644 --- a/flow/layers/texture_layer.cc +++ b/flow/layers/texture_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/texture_layer.h" -#include "flutter/flow/texture.h" +#include "flutter/common/graphics/texture.h" namespace flutter { diff --git a/flow/surface.h b/flow/surface.h index 610cc43232bba..fa29e41d03320 100644 --- a/flow/surface.h +++ b/flow/surface.h @@ -7,8 +7,8 @@ #include +#include "flutter/common/graphics/gl_context_switch.h" #include "flutter/flow/embedded_views.h" -#include "flutter/flow/gl_context_switch.h" #include "flutter/flow/surface_frame.h" #include "flutter/fml/macros.h" diff --git a/flow/surface_frame.h b/flow/surface_frame.h index d2326508c9c84..ad4b3c95a95d2 100644 --- a/flow/surface_frame.h +++ b/flow/surface_frame.h @@ -7,7 +7,7 @@ #include -#include "flutter/flow/gl_context_switch.h" +#include "flutter/common/graphics/gl_context_switch.h" #include "flutter/fml/macros.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkSurface.h" diff --git a/flow/testing/gl_context_switch_test.h b/flow/testing/gl_context_switch_test.h index f65b475d021e9..e2cd8b96c0c35 100644 --- a/flow/testing/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 "flutter/flow/gl_context_switch.h" +#include "flutter/common/graphics/gl_context_switch.h" #include "gtest/gtest.h" namespace flutter { diff --git a/flow/testing/mock_texture.h b/flow/testing/mock_texture.h index fe45292e4e4bb..8120d933f3ade 100644 --- a/flow/testing/mock_texture.h +++ b/flow/testing/mock_texture.h @@ -5,7 +5,7 @@ #include #include -#include "flutter/flow/texture.h" +#include "flutter/common/graphics/texture.h" #include "flutter/testing/assertions_skia.h" namespace flutter { diff --git a/flow/texture_unittests.cc b/flow/texture_unittests.cc index ecf5acbc39223..bb39dbfb39347 100644 --- a/flow/texture_unittests.cc +++ b/flow/texture_unittests.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/flow/texture.h" +#include "flutter/common/graphics/texture.h" #include "flutter/flow/testing/mock_texture.h" #include "gtest/gtest.h" diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 13fc319f9f27e..b08fa8f6a5755 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -69,8 +69,6 @@ source_set("common") { "display_manager.h", "engine.cc", "engine.h", - "persistent_cache.cc", - "persistent_cache.h", "pipeline.cc", "pipeline.h", "platform_view.cc", @@ -111,6 +109,7 @@ source_set("common") { deps = [ "//flutter/assets", "//flutter/common", + "//flutter/common/graphics", "//flutter/flow", "//flutter/fml", "//flutter/lib/ui", @@ -189,6 +188,7 @@ if (enable_unittests) { ] public_deps = [ + "//flutter/common/graphics", "//flutter/flow", "//flutter/fml/dart", "//flutter/runtime", @@ -253,6 +253,7 @@ if (enable_unittests) { ":shell_test_fixture_sources", ":shell_unittests_fixtures", "//flutter/assets", + "//flutter/common/graphics", "//flutter/shell/version", "//third_party/googletest:gmock", ] diff --git a/shell/common/persistent_cache_unittests.cc b/shell/common/persistent_cache_unittests.cc index 77c5a8a9ddf52..3d45c09302f76 100644 --- a/shell/common/persistent_cache_unittests.cc +++ b/shell/common/persistent_cache_unittests.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/persistent_cache.h" +#include "flutter/common/graphics/persistent_cache.h" #include diff --git a/shell/common/platform_view.h b/shell/common/platform_view.h index d5527b2bc0678..7b0fffd4c6743 100644 --- a/shell/common/platform_view.h +++ b/shell/common/platform_view.h @@ -8,9 +8,9 @@ #include #include "flow/embedded_views.h" +#include "flutter/common/graphics/texture.h" #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" #include "flutter/lib/ui/semantics/custom_accessibility_action.h" diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index f316363859de7..4ec8d5b99026a 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -6,9 +6,9 @@ #include +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/fml/time/time_delta.h" #include "flutter/fml/time/time_point.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/serialization_callbacks.h" #include "third_party/skia/include/core/SkEncodedImageFormat.h" #include "third_party/skia/include/core/SkImageEncoder.h" diff --git a/shell/common/run_configuration.cc b/shell/common/run_configuration.cc index 1b32d5c295fbd..beace53a40e34 100644 --- a/shell/common/run_configuration.cc +++ b/shell/common/run_configuration.cc @@ -7,10 +7,10 @@ #include #include "flutter/assets/directory_asset_bundle.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/fml/file.h" #include "flutter/fml/unique_fd.h" #include "flutter/runtime/dart_vm.h" -#include "flutter/shell/common/persistent_cache.h" namespace flutter { diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 2a21ef7ee1280..b9dabf587b5d1 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -10,6 +10,7 @@ #include #include "flutter/assets/directory_asset_bundle.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/fml/file.h" #include "flutter/fml/icu_util.h" #include "flutter/fml/log_settings.h" @@ -21,7 +22,6 @@ #include "flutter/fml/unique_fd.h" #include "flutter/runtime/dart_vm.h" #include "flutter/shell/common/engine.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/skia_event_tracer_impl.h" #include "flutter/shell/common/switches.h" #include "flutter/shell/common/vsync_waiter.h" diff --git a/shell/common/shell.h b/shell/common/shell.h index 89fee66841aa1..ffb07b877d493 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -11,10 +11,10 @@ #include #include "flutter/assets/directory_asset_bundle.h" +#include "flutter/common/graphics/texture.h" #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" #include "flutter/fml/memory/ref_ptr.h" diff --git a/shell/common/shell_io_manager.cc b/shell/common/shell_io_manager.cc index 52c74dd8165ee..c98e83c5f05c4 100644 --- a/shell/common/shell_io_manager.cc +++ b/shell/common/shell_io_manager.cc @@ -4,9 +4,9 @@ #include "flutter/shell/common/shell_io_manager.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/fml/build_config.h" #include "flutter/fml/message_loop.h" -#include "flutter/shell/common/persistent_cache.h" #include "third_party/skia/include/gpu/gl/GrGLInterface.h" namespace flutter { diff --git a/shell/common/shell_test.h b/shell/common/shell_test.h index 57945fc23e809..5d27335b23437 100644 --- a/shell/common/shell_test.h +++ b/shell/common/shell_test.h @@ -9,13 +9,13 @@ #include +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/common/settings.h" #include "flutter/flow/layers/container_layer.h" #include "flutter/fml/build_config.h" #include "flutter/fml/macros.h" #include "flutter/fml/time/time_point.h" #include "flutter/lib/ui/window/platform_message.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/run_configuration.h" #include "flutter/shell/common/shell_test_external_view_embedder.h" #include "flutter/shell/common/thread_host.h" diff --git a/shell/common/shell_test_platform_view_vulkan.cc b/shell/common/shell_test_platform_view_vulkan.cc index b34c1a70b8017..4415d5e9bf2a0 100644 --- a/shell/common/shell_test_platform_view_vulkan.cc +++ b/shell/common/shell_test_platform_view_vulkan.cc @@ -4,7 +4,7 @@ #include "flutter/shell/common/shell_test_platform_view_vulkan.h" -#include "flutter/shell/common/persistent_cache.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/vulkan/vulkan_utilities.h" namespace flutter { diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index 604b344748f5d..5add14df767a6 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -11,6 +11,7 @@ #include #include "assets/directory_asset_bundle.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/flow/layers/layer_tree.h" #include "flutter/flow/layers/picture_layer.h" #include "flutter/flow/layers/transform_layer.h" @@ -21,7 +22,6 @@ #include "flutter/fml/synchronization/count_down_latch.h" #include "flutter/fml/synchronization/waitable_event.h" #include "flutter/runtime/dart_vm.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/platform_view.h" #include "flutter/shell/common/rasterizer.h" #include "flutter/shell/common/shell_test.h" diff --git a/shell/common/skp_shader_warmup_unittests.cc b/shell/common/skp_shader_warmup_unittests.cc index 1cb80189ec322..7790e66667fdc 100644 --- a/shell/common/skp_shader_warmup_unittests.cc +++ b/shell/common/skp_shader_warmup_unittests.cc @@ -5,6 +5,7 @@ #include #include "flutter/assets/directory_asset_bundle.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/flow/layers/container_layer.h" #include "flutter/flow/layers/layer.h" #include "flutter/flow/layers/physical_shape_layer.h" @@ -13,7 +14,6 @@ #include "flutter/fml/file.h" #include "flutter/fml/log_settings.h" #include "flutter/fml/unique_fd.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/serialization_callbacks.h" #include "flutter/shell/common/shell_test.h" #include "flutter/shell/common/switches.h" diff --git a/shell/gpu/BUILD.gn b/shell/gpu/BUILD.gn index a4c59e28b765f..a431dfe9ee3c6 100644 --- a/shell/gpu/BUILD.gn +++ b/shell/gpu/BUILD.gn @@ -7,6 +7,7 @@ import("//flutter/shell/config.gni") gpu_common_deps = [ "//flutter/common", + "//flutter/common/graphics", "//flutter/flow", "//flutter/fml", "//flutter/shell/common", diff --git a/shell/gpu/gpu_surface_gl.cc b/shell/gpu/gpu_surface_gl.cc index a539c98570672..36a5e2eb47a06 100644 --- a/shell/gpu/gpu_surface_gl.cc +++ b/shell/gpu/gpu_surface_gl.cc @@ -4,11 +4,11 @@ #include "flutter/shell/gpu/gpu_surface_gl.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/fml/base32.h" #include "flutter/fml/logging.h" #include "flutter/fml/size.h" #include "flutter/fml/trace_event.h" -#include "flutter/shell/common/persistent_cache.h" #include "third_party/skia/include/core/SkColorFilter.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" diff --git a/shell/gpu/gpu_surface_gl.h b/shell/gpu/gpu_surface_gl.h index 326efcec3626a..481e194d907e9 100644 --- a/shell/gpu/gpu_surface_gl.h +++ b/shell/gpu/gpu_surface_gl.h @@ -8,8 +8,8 @@ #include #include +#include "flutter/common/graphics/gl_context_switch.h" #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" diff --git a/shell/gpu/gpu_surface_gl_delegate.h b/shell/gpu/gpu_surface_gl_delegate.h index e35be2c6232bb..2208123bf2ec5 100644 --- a/shell/gpu/gpu_surface_gl_delegate.h +++ b/shell/gpu/gpu_surface_gl_delegate.h @@ -5,8 +5,8 @@ #ifndef FLUTTER_SHELL_GPU_GPU_SURFACE_GL_DELEGATE_H_ #define FLUTTER_SHELL_GPU_GPU_SURFACE_GL_DELEGATE_H_ +#include "flutter/common/graphics/gl_context_switch.h" #include "flutter/flow/embedded_views.h" -#include "flutter/flow/gl_context_switch.h" #include "flutter/fml/macros.h" #include "flutter/shell/gpu/gpu_surface_delegate.h" #include "third_party/skia/include/core/SkMatrix.h" diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index 91d2a368b1057..56bf9259a4465 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -55,6 +55,7 @@ shared_library("flutter_shell_native") { ":icudtl_object", "//flutter/assets", "//flutter/common", + "//flutter/common/graphics", "//flutter/flow", "//flutter/fml", "//flutter/lib/ui", diff --git a/shell/platform/android/android_external_texture_gl.h b/shell/platform/android/android_external_texture_gl.h index fb392b9c07850..ef4c3d0d454ff 100644 --- a/shell/platform/android/android_external_texture_gl.h +++ b/shell/platform/android/android_external_texture_gl.h @@ -7,7 +7,7 @@ #include -#include "flutter/flow/texture.h" +#include "flutter/common/graphics/texture.h" #include "flutter/fml/platform/android/jni_weak_ref.h" #include "flutter/shell/platform/android/platform_view_android_jni_impl.h" diff --git a/shell/platform/darwin/ios/BUILD.gn b/shell/platform/darwin/ios/BUILD.gn index e06275c3cfa59..706f4aa43436c 100644 --- a/shell/platform/darwin/ios/BUILD.gn +++ b/shell/platform/darwin/ios/BUILD.gn @@ -133,6 +133,7 @@ source_set("flutter_framework_source") { deps = [ ":ios_gpu_configuration", "//flutter/common", + "//flutter/common/graphics", "//flutter/flow", "//flutter/fml", "//flutter/lib/ui", diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 72c18aa47c667..6160839627ee3 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -9,9 +9,9 @@ #include #include +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/flow/rtree.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" -#include "flutter/shell/common/persistent_cache.h" #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.h" #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h" diff --git a/shell/platform/darwin/ios/ios_context.h b/shell/platform/darwin/ios/ios_context.h index 21ffc8001d1f3..6b2bf5e766c5b 100644 --- a/shell/platform/darwin/ios/ios_context.h +++ b/shell/platform/darwin/ios/ios_context.h @@ -7,8 +7,8 @@ #include -#include "flutter/flow/gl_context_switch.h" -#include "flutter/flow/texture.h" +#include "flutter/common/graphics/gl_context_switch.h" +#include "flutter/common/graphics/texture.h" #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterTexture.h" diff --git a/shell/platform/darwin/ios/ios_context_metal.mm b/shell/platform/darwin/ios/ios_context_metal.mm index e951fa54c3234..21a7f7e66f1ad 100644 --- a/shell/platform/darwin/ios/ios_context_metal.mm +++ b/shell/platform/darwin/ios/ios_context_metal.mm @@ -4,8 +4,8 @@ #import "flutter/shell/platform/darwin/ios/ios_context_metal.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/fml/logging.h" -#include "flutter/shell/common/persistent_cache.h" #import "flutter/shell/platform/darwin/ios/ios_external_texture_metal.h" #include "third_party/skia/include/gpu/GrContextOptions.h" diff --git a/shell/platform/darwin/ios/ios_external_texture_gl.h b/shell/platform/darwin/ios/ios_external_texture_gl.h index b7ad8b4daefd5..e708504419c3f 100644 --- a/shell/platform/darwin/ios/ios_external_texture_gl.h +++ b/shell/platform/darwin/ios/ios_external_texture_gl.h @@ -5,7 +5,7 @@ #ifndef FLUTTER_SHELL_PLATFORM_IOS_EXTERNAL_TEXTURE_GL_H_ #define FLUTTER_SHELL_PLATFORM_IOS_EXTERNAL_TEXTURE_GL_H_ -#include "flutter/flow/texture.h" +#include "flutter/common/graphics/texture.h" #include "flutter/fml/platform/darwin/cf_utils.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterTexture.h" diff --git a/shell/platform/darwin/ios/ios_external_texture_metal.h b/shell/platform/darwin/ios/ios_external_texture_metal.h index ac0deb10381db..dcd8a48170ad7 100644 --- a/shell/platform/darwin/ios/ios_external_texture_metal.h +++ b/shell/platform/darwin/ios/ios_external_texture_metal.h @@ -9,7 +9,7 @@ #import -#include "flutter/flow/texture.h" +#include "flutter/common/graphics/texture.h" #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/cf_utils.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" diff --git a/shell/platform/darwin/ios/ios_switchable_gl_context.h b/shell/platform/darwin/ios/ios_switchable_gl_context.h index 4043c9f6bde29..24bceb3e60249 100644 --- a/shell/platform/darwin/ios/ios_switchable_gl_context.h +++ b/shell/platform/darwin/ios/ios_switchable_gl_context.h @@ -5,7 +5,7 @@ #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/common/graphics/gl_context_switch.h" #include "flutter/fml/macros.h" #include "flutter/fml/memory/thread_checker.h" #include "flutter/fml/memory/weak_ptr.h" diff --git a/shell/platform/embedder/BUILD.gn b/shell/platform/embedder/BUILD.gn index 0ad51fbfc74b1..7868f0c144ed4 100644 --- a/shell/platform/embedder/BUILD.gn +++ b/shell/platform/embedder/BUILD.gn @@ -76,6 +76,7 @@ template("embedder_source_set") { ":embedder_gpu_configuration", "//flutter/assets", "//flutter/common", + "//flutter/common/graphics", "//flutter/flow", "//flutter/fml", "//flutter/lib/ui", diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index b0c61a1b58c79..726312a36f3d2 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -36,6 +36,7 @@ extern const intptr_t kPlatformStrongDillSize; } #include "flutter/assets/directory_asset_bundle.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/common/task_runners.h" #include "flutter/fml/command_line.h" #include "flutter/fml/file.h" @@ -43,7 +44,6 @@ extern const intptr_t kPlatformStrongDillSize; #include "flutter/fml/message_loop.h" #include "flutter/fml/paths.h" #include "flutter/fml/trace_event.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/rasterizer.h" #include "flutter/shell/common/switches.h" #include "flutter/shell/platform/embedder/embedder.h" diff --git a/shell/platform/embedder/embedder_external_texture_gl.h b/shell/platform/embedder/embedder_external_texture_gl.h index 0ed2ca5770746..8d9914080714b 100644 --- a/shell/platform/embedder/embedder_external_texture_gl.h +++ b/shell/platform/embedder/embedder_external_texture_gl.h @@ -5,7 +5,7 @@ #ifndef FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_TEXTURE_GL_H_ #define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_TEXTURE_GL_H_ -#include "flutter/flow/texture.h" +#include "flutter/common/graphics/texture.h" #include "flutter/fml/macros.h" #include "third_party/skia/include/core/SkImage.h" #include "third_party/skia/include/core/SkSize.h" diff --git a/shell/platform/fuchsia/flutter/BUILD.gn b/shell/platform/fuchsia/flutter/BUILD.gn index 5aeb1e3126820..c03534e7c9df3 100644 --- a/shell/platform/fuchsia/flutter/BUILD.gn +++ b/shell/platform/fuchsia/flutter/BUILD.gn @@ -104,6 +104,7 @@ template("runner_sources") { # The use of these dependencies is temporary and will be moved behind the # embedder API. flutter_public_deps = [ + "//flutter/common/graphics", "//flutter/flow", "//flutter/lib/ui", "//flutter/runtime", @@ -460,6 +461,7 @@ executable("flutter_runner_unittests") { # embedder API. flutter_deps = [ "//flutter/assets:assets", + "//flutter/common/graphics", "//flutter/flow", "//flutter/lib/ui", "//flutter/shell/common", diff --git a/shell/platform/fuchsia/flutter/engine.cc b/shell/platform/fuchsia/flutter/engine.cc index ccda074c397cd..4ef7e620615d5 100644 --- a/shell/platform/fuchsia/flutter/engine.cc +++ b/shell/platform/fuchsia/flutter/engine.cc @@ -9,12 +9,12 @@ #include "../runtime/dart/utils/files.h" #include "flow/embedded_views.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/common/task_runners.h" #include "flutter/fml/make_copyable.h" #include "flutter/fml/synchronization/waitable_event.h" #include "flutter/fml/task_runner.h" #include "flutter/runtime/dart_vm_lifecycle.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/rasterizer.h" #include "flutter/shell/common/run_configuration.h" #include "flutter/shell/common/serialization_callbacks.h" diff --git a/shell/platform/fuchsia/flutter/tests/engine_unittests.cc b/shell/platform/fuchsia/flutter/tests/engine_unittests.cc index 2901f1145bda3..d3a78b697fec8 100644 --- a/shell/platform/fuchsia/flutter/tests/engine_unittests.cc +++ b/shell/platform/fuchsia/flutter/tests/engine_unittests.cc @@ -9,10 +9,10 @@ #include #include "assets/directory_asset_bundle.h" +#include "flutter/common/graphics/persistent_cache.h" #include "flutter/fml/memory/ref_ptr.h" #include "flutter/fml/message_loop_impl.h" #include "flutter/fml/task_runner.h" -#include "flutter/shell/common/persistent_cache.h" #include "flutter/shell/common/serialization_callbacks.h" #include "flutter/shell/platform/fuchsia/flutter/logging.h" #include "flutter/shell/platform/fuchsia/flutter/runner.h"