diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 93948761cd3b5dc66d861b0d7a12cb3c7e98e8c7..a6a76600ffa367aeec00e07647248ca00a468214 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 0000000000000000000000000000000000000000..5afc6cae533ede095278bb9d75bd9afe6fc62142 --- /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 bace0ebee4698c649de87e2ed66a25eca5c587e6..71ab99c5654b8676be1c8f7d6270f2278e64cf4d 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 35976f7325f2347f2bfb910225580d80065cb5cd..18710ce627a60e85315b115f44324181d73623de 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 3152631e3a4936230c18460c65853b99585ff6fc..e24509c4d72b91ae4bc9c3ae1914a06a5afadabb 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 1843501b969f38b00cefaa8cf2f6c6ceb5671995..8585b9d671c2e9c3196c85d9b1ecf6793ae1804e 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 c81314bf017fea65de565883fdab437fe959a981..c5ad5fdf29af8a7c9859f25101309b80503a078c 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 dd136942d36ec3d560fa2c155e36864e1b0f1aaa..794194ae47d44e8ea56669cb46ee9b1919b52147 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 f769ee405afd5fb44fa09b5bad78459c81c022e2..94b7827bb7e05c2e2e03a0d6902f0b86ba6948a3 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 7631e7e41ee2a7e181504ed4eafc3521e3e32966..ca1bb662f68cf3481f61c634139e97bc4cc3a986 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 916297912ba85ddb7484f7d38dd57b86d0c10d62..6d4acf2128102d43a7bf8da11e1bee68ed5692b5 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 0ce351db63b2f7c93fde9b1d6dd587650e73ce04..0c7ef6568e6ce72440d77a62c74471f18350c1c5 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 55e3ed3f16e3ccd1069411c049eef8a5f6b3ac82..e5775149a8d7aefcc3330c8e7314b1c299a268e0 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 610cc43232bba19f52c828a91829971556cde4e0..fa29e41d0332087563a0c543287f8b7db4f4ed11 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 d2326508c9c84b16ce02a586b239443df4696b7d..ad4b3c95a95d2e89b76ef355139e3af94101f0a8 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 f65b475d021e9763b862f10c522b60435fd96534..e2cd8b96c0c35f4543e46ea01ecd19bb54a4e739 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 fe45292e4e4bbcaa73284a7d4fa152f3b4a6da33..8120d933f3adea7b4fefee490fdff9ddf1fa25b2 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 ecf5acbc3922372ab08584f0500310187fb3f4c8..bb39dbfb39347f249ae7f795e7bbd8bb765df24e 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 13fc319f9f27e5c9badb1ee7707d0c8f28aa0333..b08fa8f6a57553f6c3302fa85522d895a5763ee5 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 77c5a8a9ddf52159d6cf76dfa0c52f243ede1748..3d45c09302f76d4dd44e19318425466d84e041e2 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 d5527b2bc067867b259ff61726e7163ebba5a58e..7b0fffd4c674362813c0d75a5c529b07646057d9 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 f316363859de71f7acec01a57e189f643f3c1ace..4ec8d5b99026aaddc6549cdca14d09baeb96e1fa 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 1b32d5c295fbd50714fc12020855e75fbb3f90c7..beace53a40e341fd80dd9da7516dca8948ea7d33 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 2a21ef7ee1280dc891b0f7f7e499092cc367d03e..b9dabf587b5d13e28cbd89f4c79aac9ea3485741 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 89fee66841aa15c04943021fd8f187b5fe429f3a..ffb07b877d493accf7ed76b5da6c12102824200a 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 52c74dd8165eeac677efea9858e4786c0fc8392c..c98e83c5f05c4b134008bd825b51b8c51f4bc146 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 57945fc23e809adb8d6a165f36313fe2de821269..5d27335b23437c2301c47d85b942470cc61c67e0 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 b34c1a70b80179ad0fbd33bb3f96882db1fe7305..4415d5e9bf2a03635aaa0fcf3e8ac07cd9dfdd63 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 604b344748f5d55e2ae09210911db608a5f25a6c..5add14df767a61de046626d5ff7a3210781b4a5f 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 1cb80189ec32270be1b11ca4a5350d81ab0d9861..7790e66667fdc77d6f26b1ac2c4d35bebdb9aac8 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 a4c59e28b765f0c7bcce703c30c4c46af0bcfa85..a431dfe9ee3c667cb8590e53d23091ee8afbe756 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 a539c98570672bc3000ad3ae3923348edaf17c33..36a5e2eb47a066eaf74a377e436757e26a8b6c2e 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 326efcec3626ae4c0025ce5a1c760470e9830d45..481e194d907e9b83efa2cc2a6080fcce05b5fa78 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 e35be2c6232bb03ef89ca84091672ea1f8c45dbe..2208123bf2ec58f414ebe986003bac6826f1459a 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 91d2a368b105794abce5b028967267ecd0944fea..56bf9259a4465f64e5b2cd136dde8472c678a933 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 fb392b9c07850ec9c9e84f776c926ab36a2df8bf..ef4c3d0d454ff4fa3b43b3e36de073424e582442 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 e06275c3cfa59468c14becd0ad52caf217bf10f0..706f4aa43436cf2c4e0af6950226134084428da6 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 72c18aa47c6670482d86c445beecdc01035bef14..6160839627ee3b9ccb59bfe0823bccba1b2ff0cc 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 21ffc8001d1f329eb8c6d2316e22b42460e80b1a..6b2bf5e766c5b7fb6b0f0a3505cb9d569f2781da 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 e951fa54c3234adbf0bd7a76d2c9496ee6ff8b3c..21a7f7e66f1adcd2b78f2fe3be4f2fc723006d6b 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 b7ad8b4daefd592e2f890ca0f5654cca23139d9f..e708504419c3fc075ea85c58e1439cfbd71ba955 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 ac0deb10381db893686dfae9325d842f1a5e8050..dcd8a48170ad759cefc4cbd36a13fe5924bab4b5 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 4043c9f6bde295a665cc919d643a858d2ecece19..24bceb3e602492f9c6a7d1ce559b74a26013ca09 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 0ad51fbfc74b15f480159806459d3f3d3aab80d7..7868f0c144ed4d93c046c5af6764ce927f450ded 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 b0c61a1b58c79917cb7e9529723430352a8634bc..726312a36f3d29475eb0e8ac2a5e17c9c145c403 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 0ed2ca57707465c349c10417d510b4b9e585baeb..8d9914080714bdbc0a21a1a9e7f06ca1b0b9404b 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 5aeb1e3126820f4634de58c3f3ebd7fa01b68c56..c03534e7c9df301e6a1820c8895c8962b8c1b5a7 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 ccda074c397cde178eeda526f7295f09acb01085..4ef7e620615d572525d551916b4a7908f5d78340 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 2901f1145bda37d6ee23fa38875d04deb7225bcc..d3a78b697fec8f5017f90445afdebea350250e53 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"