From 8ff631f3dfb5ef8c0893113ea2860dce268ecb89 Mon Sep 17 00:00:00 2001 From: liyuqian Date: Wed, 17 Apr 2019 14:38:45 -0700 Subject: [PATCH] Rename flow namespace to flutter (#8615) This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520. --- flow/compositor_context.cc | 6 +-- flow/compositor_context.h | 4 +- flow/debug_print.cc | 5 ++- flow/debug_print.h | 4 +- flow/embedded_views.cc | 4 +- flow/embedded_views.h | 4 +- flow/export_node.cc | 6 +-- flow/export_node.h | 4 +- flow/flow_run_all_unittests.cc | 4 +- flow/flow_test_utils.cc | 4 +- flow/flow_test_utils.h | 4 +- flow/instrumentation.cc | 4 +- flow/instrumentation.h | 4 +- flow/layers/backdrop_filter_layer.cc | 4 +- flow/layers/backdrop_filter_layer.h | 4 +- flow/layers/child_scene_layer.cc | 4 +- flow/layers/child_scene_layer.h | 4 +- flow/layers/clip_path_layer.cc | 4 +- flow/layers/clip_path_layer.h | 4 +- flow/layers/clip_rect_layer.cc | 4 +- flow/layers/clip_rect_layer.h | 4 +- flow/layers/clip_rrect_layer.cc | 4 +- flow/layers/clip_rrect_layer.h | 4 +- flow/layers/color_filter_layer.cc | 4 +- flow/layers/color_filter_layer.h | 4 +- flow/layers/container_layer.cc | 4 +- flow/layers/container_layer.h | 4 +- flow/layers/layer.cc | 4 +- flow/layers/layer.h | 4 +- flow/layers/layer_tree.cc | 4 +- flow/layers/layer_tree.h | 4 +- flow/layers/opacity_layer.cc | 6 +-- flow/layers/opacity_layer.h | 4 +- flow/layers/performance_overlay_layer.cc | 4 +- flow/layers/performance_overlay_layer.h | 4 +- .../performance_overlay_layer_unittests.cc | 19 ++++---- flow/layers/physical_shape_layer.cc | 4 +- flow/layers/physical_shape_layer.h | 4 +- flow/layers/picture_layer.cc | 4 +- flow/layers/picture_layer.h | 4 +- flow/layers/platform_view_layer.cc | 4 +- flow/layers/platform_view_layer.h | 4 +- flow/layers/shader_mask_layer.cc | 4 +- flow/layers/shader_mask_layer.h | 4 +- flow/layers/texture_layer.cc | 4 +- flow/layers/texture_layer.h | 4 +- flow/layers/transform_layer.cc | 4 +- flow/layers/transform_layer.h | 4 +- flow/matrix_decomposition.cc | 4 +- flow/matrix_decomposition.h | 4 +- flow/matrix_decomposition_unittests.cc | 16 +++---- flow/paint_utils.cc | 4 +- flow/paint_utils.h | 4 +- flow/raster_cache.cc | 4 +- flow/raster_cache.h | 4 +- flow/raster_cache_key.cc | 4 +- flow/raster_cache_key.h | 4 +- flow/raster_cache_unittests.cc | 8 ++-- flow/scene_update_context.cc | 7 +-- flow/scene_update_context.h | 4 +- flow/skia_gpu_object.cc | 4 +- flow/skia_gpu_object.h | 4 +- flow/texture.cc | 4 +- flow/texture.h | 4 +- flow/view_holder.cc | 6 +-- flow/view_holder.h | 4 +- lib/ui/compositing/scene.cc | 8 ++-- lib/ui/compositing/scene.h | 8 ++-- lib/ui/compositing/scene_builder.cc | 45 ++++++++++--------- lib/ui/compositing/scene_builder.h | 6 +-- lib/ui/compositing/scene_host.cc | 16 ++++--- lib/ui/io_manager.h | 2 +- lib/ui/painting/canvas.cc | 4 +- lib/ui/painting/codec.cc | 8 ++-- lib/ui/painting/codec.h | 2 +- lib/ui/painting/engine_layer.cc | 2 +- lib/ui/painting/engine_layer.h | 8 ++-- lib/ui/painting/image.h | 4 +- lib/ui/painting/picture.cc | 5 ++- lib/ui/painting/picture.h | 6 +-- lib/ui/painting/shader.cc | 2 +- lib/ui/painting/shader.h | 6 +-- lib/ui/ui_dart_state.cc | 2 +- lib/ui/ui_dart_state.h | 4 +- runtime/runtime_delegate.h | 2 +- shell/common/animator.cc | 2 +- shell/common/animator.h | 6 +-- shell/common/engine.cc | 2 +- shell/common/engine.h | 2 +- shell/common/platform_view.cc | 2 +- shell/common/platform_view.h | 4 +- shell/common/rasterizer.cc | 24 +++++----- shell/common/rasterizer.h | 18 ++++---- shell/common/shell.cc | 4 +- shell/common/shell.h | 5 ++- shell/common/shell_io_manager.cc | 4 +- shell/common/shell_io_manager.h | 4 +- shell/common/surface.cc | 2 +- shell/common/surface.h | 2 +- shell/gpu/gpu_surface_gl.cc | 2 +- shell/gpu/gpu_surface_gl.h | 2 +- shell/gpu/gpu_surface_gl_delegate.cc | 2 +- shell/gpu/gpu_surface_gl_delegate.h | 2 +- shell/gpu/gpu_surface_software.cc | 4 +- shell/gpu/gpu_surface_software.h | 4 +- .../android/android_external_texture_gl.h | 2 +- .../framework/Source/FlutterPlatformViews.mm | 2 +- .../Source/FlutterPlatformViews_Internal.h | 2 +- .../darwin/ios/ios_external_texture_gl.h | 2 +- shell/platform/darwin/ios/ios_surface_gl.h | 16 +++---- shell/platform/darwin/ios/ios_surface_gl.mm | 5 ++- .../darwin/ios/ios_surface_software.h | 16 +++---- .../darwin/ios/ios_surface_software.mm | 4 +- .../embedder/embedder_external_texture_gl.cc | 8 ++-- .../embedder/embedder_external_texture_gl.h | 10 ++--- 115 files changed, 310 insertions(+), 301 deletions(-) diff --git a/flow/compositor_context.cc b/flow/compositor_context.cc index 30f1132818b..363696fa567 100644 --- a/flow/compositor_context.cc +++ b/flow/compositor_context.cc @@ -7,7 +7,7 @@ #include "flutter/flow/layers/layer_tree.h" #include "third_party/skia/include/core/SkCanvas.h" -namespace flow { +namespace flutter { CompositorContext::CompositorContext() = default; @@ -60,7 +60,7 @@ CompositorContext::ScopedFrame::~ScopedFrame() { context_.EndFrame(*this, instrumentation_enabled_); } -bool CompositorContext::ScopedFrame::Raster(flow::LayerTree& layer_tree, +bool CompositorContext::ScopedFrame::Raster(flutter::LayerTree& layer_tree, bool ignore_raster_cache) { layer_tree.Preroll(*this, ignore_raster_cache); // Clearing canvas after preroll reduces one render target switch when preroll @@ -82,4 +82,4 @@ void CompositorContext::OnGrContextDestroyed() { raster_cache_.Clear(); } -} // namespace flow +} // namespace flutter diff --git a/flow/compositor_context.h b/flow/compositor_context.h index f3a885ccedd..ec5e685718c 100644 --- a/flow/compositor_context.h +++ b/flow/compositor_context.h @@ -16,7 +16,7 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPictureRecorder.h" -namespace flow { +namespace flutter { class LayerTree; @@ -97,6 +97,6 @@ class CompositorContext { FML_DISALLOW_COPY_AND_ASSIGN(CompositorContext); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_COMPOSITOR_CONTEXT_H_ diff --git a/flow/debug_print.cc b/flow/debug_print.cc index a4117131354..965c3c2c786 100644 --- a/flow/debug_print.cc +++ b/flow/debug_print.cc @@ -8,7 +8,8 @@ #include "third_party/skia/include/core/SkString.h" -std::ostream& operator<<(std::ostream& os, const flow::MatrixDecomposition& m) { +std::ostream& operator<<(std::ostream& os, + const flutter::MatrixDecomposition& m) { if (!m.IsValid()) { os << "Invalid Matrix!" << std::endl; return os; @@ -72,7 +73,7 @@ std::ostream& operator<<(std::ostream& os, const SkPoint& r) { } std::ostream& operator<<(std::ostream& os, - const flow::PictureRasterCacheKey& k) { + const flutter::PictureRasterCacheKey& k) { os << "Picture: " << k.id() << " matrix: " << k.matrix(); return os; } diff --git a/flow/debug_print.h b/flow/debug_print.h index 34621e314ad..f8e0d239c8c 100644 --- a/flow/debug_print.h +++ b/flow/debug_print.h @@ -15,8 +15,8 @@ #define DEF_PRINTER(x) std::ostream& operator<<(std::ostream&, const x&); -DEF_PRINTER(flow::MatrixDecomposition); -DEF_PRINTER(flow::PictureRasterCacheKey); +DEF_PRINTER(flutter::MatrixDecomposition); +DEF_PRINTER(flutter::PictureRasterCacheKey); DEF_PRINTER(SkISize); DEF_PRINTER(SkMatrix); DEF_PRINTER(SkMatrix44); diff --git a/flow/embedded_views.cc b/flow/embedded_views.cc index 8dc634ecdd6..e37a837deec 100644 --- a/flow/embedded_views.cc +++ b/flow/embedded_views.cc @@ -4,9 +4,9 @@ #include "flutter/flow/embedded_views.h" -namespace flow { +namespace flutter { bool ExternalViewEmbedder::SubmitFrame(GrContext* context) { return false; }; -} // namespace flow +} // namespace flutter diff --git a/flow/embedded_views.h b/flow/embedded_views.h index 0fd474adb08..e7b34f753bc 100644 --- a/flow/embedded_views.h +++ b/flow/embedded_views.h @@ -12,7 +12,7 @@ #include "third_party/skia/include/core/SkPoint.h" #include "third_party/skia/include/core/SkSize.h" -namespace flow { +namespace flutter { class EmbeddedViewParams { public: @@ -44,6 +44,6 @@ class ExternalViewEmbedder { FML_DISALLOW_COPY_AND_ASSIGN(ExternalViewEmbedder); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_EMBEDDED_VIEWS_H_ diff --git a/flow/export_node.cc b/flow/export_node.cc index 9895369f4d2..f5440f5473f 100644 --- a/flow/export_node.cc +++ b/flow/export_node.cc @@ -9,7 +9,7 @@ namespace { using ExportNodeBindings = - std::unordered_map>; + std::unordered_map>; FML_THREAD_LOCAL fml::ThreadLocal tls_export_node_bindings([](intptr_t value) { delete reinterpret_cast(value); @@ -17,7 +17,7 @@ FML_THREAD_LOCAL fml::ThreadLocal tls_export_node_bindings([](intptr_t value) { } // namespace -namespace flow { +namespace flutter { ExportNode::ExportNode(zx::eventpair export_token) : pending_export_token_(std::move(export_token)) { @@ -82,4 +82,4 @@ void ExportNode::UpdateScene(SceneUpdateContext& context, : fuchsia::ui::gfx::HitTestBehavior::kSuppress); } -} // namespace flow +} // namespace flutter diff --git a/flow/export_node.h b/flow/export_node.h index 3b232abdcf1..dfc72052d65 100644 --- a/flow/export_node.h +++ b/flow/export_node.h @@ -17,7 +17,7 @@ #include "flutter/flow/scene_update_context.h" #include "flutter/fml/macros.h" -namespace flow { +namespace flutter { // Represents a Scenic |ExportNode| resource that exports an |EntityNode| to // another session. @@ -45,6 +45,6 @@ class ExportNode { FML_DISALLOW_COPY_AND_ASSIGN(ExportNode); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_EXPORT_NODE_H_ diff --git a/flow/flow_run_all_unittests.cc b/flow/flow_run_all_unittests.cc index c1755e639b0..4cf0ba3d7fc 100644 --- a/flow/flow_run_all_unittests.cc +++ b/flow/flow_run_all_unittests.cc @@ -23,9 +23,9 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); fml::CommandLine cmd = fml::CommandLineFromArgcArgv(argc, argv); - flow::SetGoldenDir( + flutter::SetGoldenDir( cmd.GetOptionValueWithDefault("golden-dir", "flutter/testing/resources")); - flow::SetFontFile(cmd.GetOptionValueWithDefault( + flutter::SetFontFile(cmd.GetOptionValueWithDefault( "font-file", "flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf")); return RUN_ALL_TESTS(); diff --git a/flow/flow_test_utils.cc b/flow/flow_test_utils.cc index 0bf6d4c31d4..bde6d9b4677 100644 --- a/flow/flow_test_utils.cc +++ b/flow/flow_test_utils.cc @@ -16,7 +16,7 @@ #include -namespace flow { +namespace flutter { static std::string gGoldenDir; static std::string gFontFile; @@ -37,4 +37,4 @@ void SetFontFile(const std::string& file) { gFontFile = file; } -} // namespace flow +} // namespace flutter diff --git a/flow/flow_test_utils.h b/flow/flow_test_utils.h index 58da75b3f4d..1e5e5cddb84 100644 --- a/flow/flow_test_utils.h +++ b/flow/flow_test_utils.h @@ -16,7 +16,7 @@ #include -namespace flow { +namespace flutter { const std::string& GetGoldenDir(); @@ -26,4 +26,4 @@ const std::string& GetFontFile(); void SetFontFile(const std::string& dir); -} // namespace flow +} // namespace flutter diff --git a/flow/instrumentation.cc b/flow/instrumentation.cc index ae9846c557f..ae07bbabc17 100644 --- a/flow/instrumentation.cc +++ b/flow/instrumentation.cc @@ -10,7 +10,7 @@ #include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkSurface.h" -namespace flow { +namespace flutter { static const size_t kMaxSamples = 120; static const size_t kMaxFrameMarkers = 8; @@ -311,4 +311,4 @@ int64_t CounterValues::GetMinValue() const { return min; } -} // namespace flow +} // namespace flutter diff --git a/flow/instrumentation.h b/flow/instrumentation.h index a991af5b583..aae76cc8198 100644 --- a/flow/instrumentation.h +++ b/flow/instrumentation.h @@ -12,7 +12,7 @@ #include "flutter/fml/time/time_point.h" #include "third_party/skia/include/core/SkCanvas.h" -namespace flow { +namespace flutter { // DEPRECATED // The frame per second FPS could be different than 60 (e.g., 120). @@ -94,6 +94,6 @@ class CounterValues { FML_DISALLOW_COPY_AND_ASSIGN(CounterValues); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_INSTRUMENTATION_H_ diff --git a/flow/layers/backdrop_filter_layer.cc b/flow/layers/backdrop_filter_layer.cc index f45c28b7d23..cfa678e39ef 100644 --- a/flow/layers/backdrop_filter_layer.cc +++ b/flow/layers/backdrop_filter_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/backdrop_filter_layer.h" -namespace flow { +namespace flutter { BackdropFilterLayer::BackdropFilterLayer() = default; @@ -20,4 +20,4 @@ void BackdropFilterLayer::Paint(PaintContext& context) const { PaintChildren(context); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/backdrop_filter_layer.h b/flow/layers/backdrop_filter_layer.h index 39bd64c33b2..b2734273716 100644 --- a/flow/layers/backdrop_filter_layer.h +++ b/flow/layers/backdrop_filter_layer.h @@ -9,7 +9,7 @@ #include "third_party/skia/include/core/SkImageFilter.h" -namespace flow { +namespace flutter { class BackdropFilterLayer : public ContainerLayer { public: @@ -26,6 +26,6 @@ class BackdropFilterLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(BackdropFilterLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_BACKDROP_FILTER_LAYER_H_ diff --git a/flow/layers/child_scene_layer.cc b/flow/layers/child_scene_layer.cc index a1391da09e1..37937f1af71 100644 --- a/flow/layers/child_scene_layer.cc +++ b/flow/layers/child_scene_layer.cc @@ -7,7 +7,7 @@ #include "flutter/flow/export_node.h" #include "flutter/flow/view_holder.h" -namespace flow { +namespace flutter { ChildSceneLayer::ChildSceneLayer(zx_koid_t layer_id, bool use_view_holder, @@ -44,4 +44,4 @@ void ChildSceneLayer::UpdateScene(SceneUpdateContext& context) { } } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/child_scene_layer.h b/flow/layers/child_scene_layer.h index da7caa4086d..d3639850da4 100644 --- a/flow/layers/child_scene_layer.h +++ b/flow/layers/child_scene_layer.h @@ -12,7 +12,7 @@ #include "flutter/flow/layers/layer.h" #include "flutter/flow/scene_update_context.h" -namespace flow { +namespace flutter { // Layer that represents an embedded child. class ChildSceneLayer : public Layer { @@ -40,6 +40,6 @@ class ChildSceneLayer : public Layer { FML_DISALLOW_COPY_AND_ASSIGN(ChildSceneLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_CHILD_SCENE_LAYER_H_ diff --git a/flow/layers/clip_path_layer.cc b/flow/layers/clip_path_layer.cc index d119ea606d7..77397d91476 100644 --- a/flow/layers/clip_path_layer.cc +++ b/flow/layers/clip_path_layer.cc @@ -10,7 +10,7 @@ #endif // defined(OS_FUCHSIA) -namespace flow { +namespace flutter { ClipPathLayer::ClipPathLayer(Clip clip_behavior) : clip_behavior_(clip_behavior) { @@ -69,4 +69,4 @@ void ClipPathLayer::Paint(PaintContext& context) const { } } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/clip_path_layer.h b/flow/layers/clip_path_layer.h index 7b6de1f60f5..814e6c2bd20 100644 --- a/flow/layers/clip_path_layer.h +++ b/flow/layers/clip_path_layer.h @@ -7,7 +7,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { class ClipPathLayer : public ContainerLayer { public: @@ -31,6 +31,6 @@ class ClipPathLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(ClipPathLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_CLIP_PATH_LAYER_H_ diff --git a/flow/layers/clip_rect_layer.cc b/flow/layers/clip_rect_layer.cc index 73c76bff331..3f41d8768c6 100644 --- a/flow/layers/clip_rect_layer.cc +++ b/flow/layers/clip_rect_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/clip_rect_layer.h" -namespace flow { +namespace flutter { ClipRectLayer::ClipRectLayer(Clip clip_behavior) : clip_behavior_(clip_behavior) { @@ -59,4 +59,4 @@ void ClipRectLayer::Paint(PaintContext& context) const { } } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/clip_rect_layer.h b/flow/layers/clip_rect_layer.h index 76e10e49bb7..56f3d1a826c 100644 --- a/flow/layers/clip_rect_layer.h +++ b/flow/layers/clip_rect_layer.h @@ -7,7 +7,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { class ClipRectLayer : public ContainerLayer { public: @@ -30,6 +30,6 @@ class ClipRectLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(ClipRectLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_CLIP_RECT_LAYER_H_ diff --git a/flow/layers/clip_rrect_layer.cc b/flow/layers/clip_rrect_layer.cc index 72092110cf7..d387f58b1dc 100644 --- a/flow/layers/clip_rrect_layer.cc +++ b/flow/layers/clip_rrect_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/clip_rrect_layer.h" -namespace flow { +namespace flutter { ClipRRectLayer::ClipRRectLayer(Clip clip_behavior) : clip_behavior_(clip_behavior) { @@ -67,4 +67,4 @@ void ClipRRectLayer::Paint(PaintContext& context) const { } } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/clip_rrect_layer.h b/flow/layers/clip_rrect_layer.h index 7b3ac85beb6..66bae7cf374 100644 --- a/flow/layers/clip_rrect_layer.h +++ b/flow/layers/clip_rrect_layer.h @@ -7,7 +7,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { class ClipRRectLayer : public ContainerLayer { public: @@ -31,6 +31,6 @@ class ClipRRectLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(ClipRRectLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_CLIP_RRECT_LAYER_H_ diff --git a/flow/layers/color_filter_layer.cc b/flow/layers/color_filter_layer.cc index 40732be5a73..c52bcdc28f4 100644 --- a/flow/layers/color_filter_layer.cc +++ b/flow/layers/color_filter_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/color_filter_layer.h" -namespace flow { +namespace flutter { ColorFilterLayer::ColorFilterLayer() = default; @@ -22,4 +22,4 @@ void ColorFilterLayer::Paint(PaintContext& context) const { PaintChildren(context); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/color_filter_layer.h b/flow/layers/color_filter_layer.h index 358788fdd44..eec7dae0257 100644 --- a/flow/layers/color_filter_layer.h +++ b/flow/layers/color_filter_layer.h @@ -7,7 +7,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { class ColorFilterLayer : public ContainerLayer { public: @@ -27,6 +27,6 @@ class ColorFilterLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(ColorFilterLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_COLOR_FILTER_LAYER_H_ diff --git a/flow/layers/container_layer.cc b/flow/layers/container_layer.cc index f6ca64005fe..40d600e1c3e 100644 --- a/flow/layers/container_layer.cc +++ b/flow/layers/container_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { ContainerLayer::ContainerLayer() {} @@ -69,4 +69,4 @@ void ContainerLayer::UpdateSceneChildren(SceneUpdateContext& context) { #endif // defined(OS_FUCHSIA) -} // namespace flow +} // namespace flutter diff --git a/flow/layers/container_layer.h b/flow/layers/container_layer.h index 9bac25d9633..ef1c03328d1 100644 --- a/flow/layers/container_layer.h +++ b/flow/layers/container_layer.h @@ -8,7 +8,7 @@ #include #include "flutter/flow/layers/layer.h" -namespace flow { +namespace flutter { class ContainerLayer : public Layer { public: @@ -44,6 +44,6 @@ class ContainerLayer : public Layer { FML_DISALLOW_COPY_AND_ASSIGN(ContainerLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_CONTAINER_LAYER_H_ diff --git a/flow/layers/layer.cc b/flow/layers/layer.cc index c3653ed52d0..45f1a08bcd0 100644 --- a/flow/layers/layer.cc +++ b/flow/layers/layer.cc @@ -7,7 +7,7 @@ #include "flutter/flow/paint_utils.h" #include "third_party/skia/include/core/SkColorFilter.h" -namespace flow { +namespace flutter { Layer::Layer() : parent_(nullptr), @@ -55,4 +55,4 @@ Layer::AutoSaveLayer::~AutoSaveLayer() { paint_context_.internal_nodes_canvas->restore(); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/layer.h b/flow/layers/layer.h index dc1242f0f76..1880ff064e7 100644 --- a/flow/layers/layer.h +++ b/flow/layers/layer.h @@ -35,7 +35,7 @@ #endif // defined(OS_FUCHSIA) -namespace flow { +namespace flutter { static constexpr SkRect kGiantRect = SkRect::MakeLTRB(-1E9F, -1E9F, 1E9F, 1E9F); @@ -151,6 +151,6 @@ class Layer { FML_DISALLOW_COPY_AND_ASSIGN(Layer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_LAYER_H_ diff --git a/flow/layers/layer_tree.cc b/flow/layers/layer_tree.cc index 0b24b52fd8d..5550824238c 100644 --- a/flow/layers/layer_tree.cc +++ b/flow/layers/layer_tree.cc @@ -9,7 +9,7 @@ #include "third_party/skia/include/core/SkPictureRecorder.h" #include "third_party/skia/include/utils/SkNWayCanvas.h" -namespace flow { +namespace flutter { LayerTree::LayerTree() : frame_size_{}, @@ -150,4 +150,4 @@ sk_sp LayerTree::Flatten(const SkRect& bounds) { return recorder.finishRecordingAsPicture(); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/layer_tree.h b/flow/layers/layer_tree.h index f3bfe3a3225..641948bcf77 100644 --- a/flow/layers/layer_tree.h +++ b/flow/layers/layer_tree.h @@ -16,7 +16,7 @@ #include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/core/SkSize.h" -namespace flow { +namespace flutter { class LayerTree { public: @@ -83,6 +83,6 @@ class LayerTree { FML_DISALLOW_COPY_AND_ASSIGN(LayerTree); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_LAYER_TREE_H_ diff --git a/flow/layers/opacity_layer.cc b/flow/layers/opacity_layer.cc index 99c705d8d54..2af6cb29be3 100644 --- a/flow/layers/opacity_layer.cc +++ b/flow/layers/opacity_layer.cc @@ -6,7 +6,7 @@ #include "flutter/flow/layers/transform_layer.h" -namespace flow { +namespace flutter { OpacityLayer::OpacityLayer() = default; @@ -19,7 +19,7 @@ void OpacityLayer::EnsureSingleChild() { return; } - auto new_child = std::make_shared(); + auto new_child = std::make_shared(); // Be careful: SkMatrix's default constructor doesn't initialize the matrix to // identity. Hence we have to explicitly call SkMatrix::setIdentity. @@ -104,4 +104,4 @@ void OpacityLayer::Paint(PaintContext& context) const { PaintChildren(context); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/opacity_layer.h b/flow/layers/opacity_layer.h index d33240f4878..e437041c21f 100644 --- a/flow/layers/opacity_layer.h +++ b/flow/layers/opacity_layer.h @@ -7,7 +7,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { class OpacityLayer : public ContainerLayer { public: @@ -41,6 +41,6 @@ class OpacityLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(OpacityLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_OPACITY_LAYER_H_ diff --git a/flow/layers/performance_overlay_layer.cc b/flow/layers/performance_overlay_layer.cc index 2d3c4166c93..3ef48527be2 100644 --- a/flow/layers/performance_overlay_layer.cc +++ b/flow/layers/performance_overlay_layer.cc @@ -9,7 +9,7 @@ #include "flutter/flow/layers/performance_overlay_layer.h" #include "third_party/skia/include/core/SkFont.h" -namespace flow { +namespace flutter { namespace { void DrawStatisticsText(SkCanvas& canvas, @@ -94,4 +94,4 @@ void PerformanceOverlayLayer::Paint(PaintContext& context) const { options_ & kDisplayEngineStatistics, "UI", font_path_); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/performance_overlay_layer.h b/flow/layers/performance_overlay_layer.h index a47b836c49f..b5c3370d205 100644 --- a/flow/layers/performance_overlay_layer.h +++ b/flow/layers/performance_overlay_layer.h @@ -10,7 +10,7 @@ #include "flutter/flow/layers/layer.h" #include "flutter/fml/macros.h" -namespace flow { +namespace flutter { const int kDisplayRasterizerStatistics = 1 << 0; const int kVisualizeRasterizerStatistics = 1 << 1; @@ -31,6 +31,6 @@ class PerformanceOverlayLayer : public Layer { FML_DISALLOW_COPY_AND_ASSIGN(PerformanceOverlayLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_PERFORMANCE_OVERLAY_LAYER_H_ diff --git a/flow/layers/performance_overlay_layer_unittests.cc b/flow/layers/performance_overlay_layer_unittests.cc index db7e2c4c67b..6f9ba14610d 100644 --- a/flow/layers/performance_overlay_layer_unittests.cc +++ b/flow/layers/performance_overlay_layer_unittests.cc @@ -28,13 +28,13 @@ const char* kGoldenFileName = "performance_overlay_gold.png"; const char* kNewGoldenFileName = "performance_overlay_gold_new.png"; TEST(PerformanceOverlayLayer, Gold) { - const std::string& golden_dir = flow::GetGoldenDir(); + const std::string& golden_dir = flutter::GetGoldenDir(); // This unit test should only be run on Linux (not even on Mac since it's a // golden test). Hence we don't have to worry about the "/" vs. "\". std::string golden_file_path = golden_dir + "/" + kGoldenFileName; std::string new_golden_file_path = golden_dir + "/" + kNewGoldenFileName; - flow::Stopwatch mock_stopwatch; + flutter::Stopwatch mock_stopwatch; for (int i = 0; i < size(kMockedTimes); ++i) { mock_stopwatch.SetLapTime( fml::TimeDelta::FromMilliseconds(kMockedTimes[i])); @@ -45,19 +45,20 @@ TEST(PerformanceOverlayLayer, Gold) { ASSERT_TRUE(surface != nullptr); - flow::TextureRegistry unused_texture_registry; + flutter::TextureRegistry unused_texture_registry; - flow::Layer::PaintContext paintContext = { + flutter::Layer::PaintContext paintContext = { nullptr, surface->getCanvas(), nullptr, nullptr, mock_stopwatch, mock_stopwatch, unused_texture_registry, nullptr, false}; // Specify font file to ensure the same font across different operation // systems. - flow::PerformanceOverlayLayer layer(flow::kDisplayRasterizerStatistics | - flow::kVisualizeRasterizerStatistics | - flow::kDisplayEngineStatistics | - flow::kVisualizeEngineStatistics, - flow::GetFontFile().c_str()); + flutter::PerformanceOverlayLayer layer( + flutter::kDisplayRasterizerStatistics | + flutter::kVisualizeRasterizerStatistics | + flutter::kDisplayEngineStatistics | + flutter::kVisualizeEngineStatistics, + flutter::GetFontFile().c_str()); layer.set_paint_bounds(SkRect::MakeWH(1000, 400)); surface->getCanvas()->clear(SK_ColorTRANSPARENT); layer.Paint(paintContext); diff --git a/flow/layers/physical_shape_layer.cc b/flow/layers/physical_shape_layer.cc index 5f573ad0d3e..2bf45ea7630 100644 --- a/flow/layers/physical_shape_layer.cc +++ b/flow/layers/physical_shape_layer.cc @@ -7,7 +7,7 @@ #include "flutter/flow/paint_utils.h" #include "third_party/skia/include/utils/SkShadowUtils.h" -namespace flow { +namespace flutter { const SkScalar kLightHeight = 600; const SkScalar kLightRadius = 800; @@ -204,4 +204,4 @@ void PhysicalShapeLayer::DrawShadow(SkCanvas* canvas, dpr * kLightRadius, ambientColor, spotColor, flags); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/physical_shape_layer.h b/flow/layers/physical_shape_layer.h index 46885c902bb..e345102ba65 100644 --- a/flow/layers/physical_shape_layer.h +++ b/flow/layers/physical_shape_layer.h @@ -7,7 +7,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { class PhysicalShapeLayer : public ContainerLayer { public: @@ -54,6 +54,6 @@ class PhysicalShapeLayer : public ContainerLayer { Clip clip_behavior_; }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_PHYSICAL_SHAPE_LAYER_H_ diff --git a/flow/layers/picture_layer.cc b/flow/layers/picture_layer.cc index cef3321df4d..fc932a53519 100644 --- a/flow/layers/picture_layer.cc +++ b/flow/layers/picture_layer.cc @@ -6,7 +6,7 @@ #include "flutter/fml/logging.h" -namespace flow { +namespace flutter { PictureLayer::PictureLayer() = default; @@ -52,4 +52,4 @@ void PictureLayer::Paint(PaintContext& context) const { context.leaf_nodes_canvas->drawPicture(picture()); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/picture_layer.h b/flow/layers/picture_layer.h index fc50e8f3bf6..88ea2f78df5 100644 --- a/flow/layers/picture_layer.h +++ b/flow/layers/picture_layer.h @@ -11,7 +11,7 @@ #include "flutter/flow/raster_cache.h" #include "flutter/flow/skia_gpu_object.h" -namespace flow { +namespace flutter { class PictureLayer : public Layer { public: @@ -43,6 +43,6 @@ class PictureLayer : public Layer { FML_DISALLOW_COPY_AND_ASSIGN(PictureLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_PICTURE_LAYER_H_ diff --git a/flow/layers/platform_view_layer.cc b/flow/layers/platform_view_layer.cc index d10bd2ac4f3..0c9741c474c 100644 --- a/flow/layers/platform_view_layer.cc +++ b/flow/layers/platform_view_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/platform_view_layer.h" -namespace flow { +namespace flutter { PlatformViewLayer::PlatformViewLayer() = default; @@ -39,4 +39,4 @@ void PlatformViewLayer::Paint(PaintContext& context) const { context.view_embedder->CompositeEmbeddedView(view_id_, params); context.leaf_nodes_canvas = canvas; } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/platform_view_layer.h b/flow/layers/platform_view_layer.h index f3e0c48449c..02309f7fbc2 100644 --- a/flow/layers/platform_view_layer.h +++ b/flow/layers/platform_view_layer.h @@ -9,7 +9,7 @@ #include "third_party/skia/include/core/SkPoint.h" #include "third_party/skia/include/core/SkSize.h" -namespace flow { +namespace flutter { class PlatformViewLayer : public Layer { public: @@ -31,6 +31,6 @@ class PlatformViewLayer : public Layer { FML_DISALLOW_COPY_AND_ASSIGN(PlatformViewLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_PLATFORM_VIEW_LAYER_H_ diff --git a/flow/layers/shader_mask_layer.cc b/flow/layers/shader_mask_layer.cc index 5c13f56e8b9..d73a65f8a4e 100644 --- a/flow/layers/shader_mask_layer.cc +++ b/flow/layers/shader_mask_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/shader_mask_layer.h" -namespace flow { +namespace flutter { ShaderMaskLayer::ShaderMaskLayer() = default; @@ -26,4 +26,4 @@ void ShaderMaskLayer::Paint(PaintContext& context) const { SkRect::MakeWH(mask_rect_.width(), mask_rect_.height()), paint); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/shader_mask_layer.h b/flow/layers/shader_mask_layer.h index 2b4b3f052ae..12f5439be57 100644 --- a/flow/layers/shader_mask_layer.h +++ b/flow/layers/shader_mask_layer.h @@ -9,7 +9,7 @@ #include "third_party/skia/include/core/SkShader.h" -namespace flow { +namespace flutter { class ShaderMaskLayer : public ContainerLayer { public: @@ -32,6 +32,6 @@ class ShaderMaskLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(ShaderMaskLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_SHADER_MASK_LAYER_H_ diff --git a/flow/layers/texture_layer.cc b/flow/layers/texture_layer.cc index 0b121d8a208..2703940f5fb 100644 --- a/flow/layers/texture_layer.cc +++ b/flow/layers/texture_layer.cc @@ -6,7 +6,7 @@ #include "flutter/flow/texture.h" -namespace flow { +namespace flutter { TextureLayer::TextureLayer() = default; @@ -27,4 +27,4 @@ void TextureLayer::Paint(PaintContext& context) const { context.gr_context); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/texture_layer.h b/flow/layers/texture_layer.h index f761b5d02d0..dd77630e2f9 100644 --- a/flow/layers/texture_layer.h +++ b/flow/layers/texture_layer.h @@ -9,7 +9,7 @@ #include "third_party/skia/include/core/SkPoint.h" #include "third_party/skia/include/core/SkSize.h" -namespace flow { +namespace flutter { class TextureLayer : public Layer { public: @@ -33,6 +33,6 @@ class TextureLayer : public Layer { FML_DISALLOW_COPY_AND_ASSIGN(TextureLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_TEXTURE_LAYER_H_ diff --git a/flow/layers/transform_layer.cc b/flow/layers/transform_layer.cc index 7a41312fe68..9a9a7d4866c 100644 --- a/flow/layers/transform_layer.cc +++ b/flow/layers/transform_layer.cc @@ -4,7 +4,7 @@ #include "flutter/flow/layers/transform_layer.h" -namespace flow { +namespace flutter { TransformLayer::TransformLayer() { transform_.setIdentity(); @@ -69,4 +69,4 @@ void TransformLayer::Paint(PaintContext& context) const { PaintChildren(context); } -} // namespace flow +} // namespace flutter diff --git a/flow/layers/transform_layer.h b/flow/layers/transform_layer.h index ea5250662b3..ef72f969d8f 100644 --- a/flow/layers/transform_layer.h +++ b/flow/layers/transform_layer.h @@ -7,7 +7,7 @@ #include "flutter/flow/layers/container_layer.h" -namespace flow { +namespace flutter { // Be careful that SkMatrix's default constructor doesn't initialize the matrix // at all. Hence |set_transform| must be called with an initialized SkMatrix. @@ -32,6 +32,6 @@ class TransformLayer : public ContainerLayer { FML_DISALLOW_COPY_AND_ASSIGN(TransformLayer); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_LAYERS_TRANSFORM_LAYER_H_ diff --git a/flow/matrix_decomposition.cc b/flow/matrix_decomposition.cc index c710908dc65..19353939065 100644 --- a/flow/matrix_decomposition.cc +++ b/flow/matrix_decomposition.cc @@ -4,7 +4,7 @@ #include "flutter/flow/matrix_decomposition.h" -namespace flow { +namespace flutter { static inline SkVector3 SkVector3Combine(const SkVector3& a, float a_scale, @@ -151,4 +151,4 @@ bool MatrixDecomposition::IsValid() const { return valid_; } -} // namespace flow +} // namespace flutter diff --git a/flow/matrix_decomposition.h b/flow/matrix_decomposition.h index 2cf3c0faa42..81794c2fe58 100644 --- a/flow/matrix_decomposition.h +++ b/flow/matrix_decomposition.h @@ -10,7 +10,7 @@ #include "third_party/skia/include/core/SkMatrix44.h" #include "third_party/skia/include/core/SkPoint3.h" -namespace flow { +namespace flutter { /// Decomposes a given non-degenerate transformation matrix into a sequence of /// operations that produced it. The validity of the decomposition must always @@ -46,6 +46,6 @@ class MatrixDecomposition { FML_DISALLOW_COPY_AND_ASSIGN(MatrixDecomposition); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_MATRIX_DECOMPOSITION_H_ diff --git a/flow/matrix_decomposition_unittests.cc b/flow/matrix_decomposition_unittests.cc index b47af613c08..cf960252767 100644 --- a/flow/matrix_decomposition_unittests.cc +++ b/flow/matrix_decomposition_unittests.cc @@ -18,7 +18,7 @@ TEST(MatrixDecomposition, Rotation) { const auto angle = M_PI_4; matrix.setRotateAbout(0.0, 0.0, 1.0, angle); - flow::MatrixDecomposition decomposition(matrix); + flutter::MatrixDecomposition decomposition(matrix); ASSERT_TRUE(decomposition.IsValid()); const auto sine = sin(angle * 0.5); @@ -35,7 +35,7 @@ TEST(MatrixDecomposition, Scale) { const auto scale = 5.0; matrix.setScale(scale + 0, scale + 1, scale + 2); - flow::MatrixDecomposition decomposition(matrix); + flutter::MatrixDecomposition decomposition(matrix); ASSERT_TRUE(decomposition.IsValid()); ASSERT_FLOAT_EQ(scale + 0, decomposition.scale().fX); @@ -49,7 +49,7 @@ TEST(MatrixDecomposition, Translate) { const auto translate = 125.0; matrix.setTranslate(translate + 0, translate + 1, translate + 2); - flow::MatrixDecomposition decomposition(matrix); + flutter::MatrixDecomposition decomposition(matrix); ASSERT_TRUE(decomposition.IsValid()); ASSERT_FLOAT_EQ(translate + 0, decomposition.translation().fX); @@ -73,7 +73,7 @@ TEST(MatrixDecomposition, Combination) { SkMatrix44 combined = m3 * m2 * m1; - flow::MatrixDecomposition decomposition(combined); + flutter::MatrixDecomposition decomposition(combined); ASSERT_TRUE(decomposition.IsValid()); ASSERT_FLOAT_EQ(translate, decomposition.translation().fX); @@ -97,7 +97,7 @@ TEST(MatrixDecomposition, ScaleFloatError) { SkMatrix44 matrix = SkMatrix44::I(); matrix.setScale(scale, scale, 1.0f); - flow::MatrixDecomposition decomposition3(matrix); + flutter::MatrixDecomposition decomposition3(matrix); ASSERT_TRUE(decomposition3.IsValid()); ASSERT_FLOAT_EQ(scale, decomposition3.scale().fX); @@ -122,13 +122,13 @@ TEST(MatrixDecomposition, ScaleFloatError) { SkMatrix44 matrix3 = SkMatrix44::I(); matrix3.setScale(scale3, scale3, 1.f); - flow::MatrixDecomposition decomposition(matrix); + flutter::MatrixDecomposition decomposition(matrix); ASSERT_TRUE(decomposition.IsValid()); - flow::MatrixDecomposition decomposition2(matrix2); + flutter::MatrixDecomposition decomposition2(matrix2); ASSERT_TRUE(decomposition2.IsValid()); - flow::MatrixDecomposition decomposition3(matrix3); + flutter::MatrixDecomposition decomposition3(matrix3); ASSERT_TRUE(decomposition3.IsValid()); ASSERT_FLOAT_EQ(scale, decomposition.scale().fX); diff --git a/flow/paint_utils.cc b/flow/paint_utils.cc index b8ceddd4892..38fc17979a0 100644 --- a/flow/paint_utils.cc +++ b/flow/paint_utils.cc @@ -10,7 +10,7 @@ #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkShader.h" -namespace flow { +namespace flutter { namespace { @@ -50,4 +50,4 @@ void DrawCheckerboard(SkCanvas* canvas, const SkRect& rect) { canvas->drawRect(rect, debugPaint); } -} // namespace flow +} // namespace flutter diff --git a/flow/paint_utils.h b/flow/paint_utils.h index 352dee124fc..c6bfccedbd3 100644 --- a/flow/paint_utils.h +++ b/flow/paint_utils.h @@ -9,12 +9,12 @@ #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkRect.h" -namespace flow { +namespace flutter { void DrawCheckerboard(SkCanvas* canvas, SkColor c1, SkColor c2, int size); void DrawCheckerboard(SkCanvas* canvas, const SkRect& rect); -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_PAINT_UTILS_H_ diff --git a/flow/raster_cache.cc b/flow/raster_cache.cc index 004934a88db..2cd03473f0d 100644 --- a/flow/raster_cache.cc +++ b/flow/raster_cache.cc @@ -15,7 +15,7 @@ #include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/core/SkSurface.h" -namespace flow { +namespace flutter { RasterCacheResult::RasterCacheResult() {} @@ -292,4 +292,4 @@ void RasterCache::TraceStatsToTimeline() const { #endif // FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE } -} // namespace flow +} // namespace flutter diff --git a/flow/raster_cache.h b/flow/raster_cache.h index 1042e2cd7d4..f008f2459cc 100644 --- a/flow/raster_cache.h +++ b/flow/raster_cache.h @@ -15,7 +15,7 @@ #include "third_party/skia/include/core/SkImage.h" #include "third_party/skia/include/core/SkSize.h" -namespace flow { +namespace flutter { class RasterCacheResult { public: @@ -137,6 +137,6 @@ class RasterCache { FML_DISALLOW_COPY_AND_ASSIGN(RasterCache); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_RASTER_CACHE_H_ diff --git a/flow/raster_cache_key.cc b/flow/raster_cache_key.cc index 4dfef752f69..0a20cde72dc 100644 --- a/flow/raster_cache_key.cc +++ b/flow/raster_cache_key.cc @@ -4,8 +4,8 @@ #include "flutter/flow/raster_cache_key.h" -namespace flow { +namespace flutter { // -} // namespace flow +} // namespace flutter diff --git a/flow/raster_cache_key.h b/flow/raster_cache_key.h index 5fb6cc279c5..a64cabe1820 100644 --- a/flow/raster_cache_key.h +++ b/flow/raster_cache_key.h @@ -9,7 +9,7 @@ #include "flutter/flow/matrix_decomposition.h" #include "flutter/fml/logging.h" -namespace flow { +namespace flutter { template class RasterCacheKey { @@ -58,6 +58,6 @@ class Layer; using LayerRasterCacheKey = RasterCacheKey; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_RASTER_CACHE_KEY_H_ diff --git a/flow/raster_cache_unittests.cc b/flow/raster_cache_unittests.cc index 3fd73d5bca5..64f4405ebe5 100644 --- a/flow/raster_cache_unittests.cc +++ b/flow/raster_cache_unittests.cc @@ -18,13 +18,13 @@ sk_sp GetSamplePicture() { } TEST(RasterCache, SimpleInitialization) { - flow::RasterCache cache; + flutter::RasterCache cache; ASSERT_TRUE(true); } TEST(RasterCache, ThresholdIsRespected) { size_t threshold = 3; - flow::RasterCache cache(threshold); + flutter::RasterCache cache(threshold); SkMatrix matrix = SkMatrix::I(); @@ -46,7 +46,7 @@ TEST(RasterCache, ThresholdIsRespected) { TEST(RasterCache, ThresholdIsRespectedWhenZero) { size_t threshold = 0; - flow::RasterCache cache(threshold); + flutter::RasterCache cache(threshold); SkMatrix matrix = SkMatrix::I(); @@ -68,7 +68,7 @@ TEST(RasterCache, ThresholdIsRespectedWhenZero) { TEST(RasterCache, SweepsRemoveUnusedFrames) { size_t threshold = 3; - flow::RasterCache cache(threshold); + flutter::RasterCache cache(threshold); SkMatrix matrix = SkMatrix::I(); diff --git a/flow/scene_update_context.cc b/flow/scene_update_context.cc index ab8b0fe3078..d1d33450772 100644 --- a/flow/scene_update_context.cc +++ b/flow/scene_update_context.cc @@ -9,7 +9,7 @@ #include "flutter/fml/trace_event.h" #include "flutter/lib/ui/window/viewport_metrics.h" -namespace flow { +namespace flutter { // Helper function to generate clip planes for a scenic::EntityNode. static void SetEntityNodeClipPlanes(scenic::EntityNode* entity_node, @@ -188,7 +188,8 @@ scenic::Image* SceneUpdateContext::GenerateImageIfNeeded( return image; } -std::vector> +std::vector< + std::unique_ptr> SceneUpdateContext::ExecutePaintTasks(CompositorContext::ScopedFrame& frame) { TRACE_EVENT0("flutter", "SceneUpdateContext::ExecutePaintTasks"); std::vector> surfaces_to_submit; @@ -331,4 +332,4 @@ SceneUpdateContext::Clip::Clip(SceneUpdateContext& context, SetEntityNodeClipPlanes(&entity_node(), shape_bounds); } -} // namespace flow +} // namespace flutter diff --git a/flow/scene_update_context.h b/flow/scene_update_context.h index 925fc949351..ca66004735f 100644 --- a/flow/scene_update_context.h +++ b/flow/scene_update_context.h @@ -18,7 +18,7 @@ #include "third_party/skia/include/core/SkRect.h" #include "third_party/skia/include/core/SkSurface.h" -namespace flow { +namespace flutter { class Layer; @@ -232,6 +232,6 @@ class SceneUpdateContext { FML_DISALLOW_COPY_AND_ASSIGN(SceneUpdateContext); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_SCENE_UPDATE_CONTEXT_H_ diff --git a/flow/skia_gpu_object.cc b/flow/skia_gpu_object.cc index 1f789212e6b..bf1b0a1d2a7 100644 --- a/flow/skia_gpu_object.cc +++ b/flow/skia_gpu_object.cc @@ -6,7 +6,7 @@ #include "flutter/fml/message_loop.h" -namespace flow { +namespace flutter { SkiaUnrefQueue::SkiaUnrefQueue(fml::RefPtr task_runner, fml::TimeDelta delay) @@ -41,4 +41,4 @@ void SkiaUnrefQueue::Drain() { } } -} // namespace flow +} // namespace flutter diff --git a/flow/skia_gpu_object.h b/flow/skia_gpu_object.h index c7d814bfcb5..4c079af96ee 100644 --- a/flow/skia_gpu_object.h +++ b/flow/skia_gpu_object.h @@ -13,7 +13,7 @@ #include "flutter/fml/task_runner.h" #include "third_party/skia/include/core/SkRefCnt.h" -namespace flow { +namespace flutter { // A queue that holds Skia objects that must be destructed on the the given task // runner. @@ -83,6 +83,6 @@ class SkiaGPUObject { FML_DISALLOW_COPY_AND_ASSIGN(SkiaGPUObject); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_SKIA_GPU_OBJECT_H_ diff --git a/flow/texture.cc b/flow/texture.cc index bef0de01b1c..7bc40f0c1d4 100644 --- a/flow/texture.cc +++ b/flow/texture.cc @@ -4,7 +4,7 @@ #include "flutter/flow/texture.h" -namespace flow { +namespace flutter { TextureRegistry::TextureRegistry() = default; @@ -39,4 +39,4 @@ Texture::Texture(int64_t id) : id_(id) {} Texture::~Texture() = default; -} // namespace flow +} // namespace flutter diff --git a/flow/texture.h b/flow/texture.h index 6573b88618c..749e3835b23 100644 --- a/flow/texture.h +++ b/flow/texture.h @@ -11,7 +11,7 @@ #include "flutter/fml/synchronization/waitable_event.h" #include "third_party/skia/include/core/SkCanvas.h" -namespace flow { +namespace flutter { class Texture { protected: @@ -70,6 +70,6 @@ class TextureRegistry { FML_DISALLOW_COPY_AND_ASSIGN(TextureRegistry); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_TEXTURE_H_ diff --git a/flow/view_holder.cc b/flow/view_holder.cc index 129f843724d..f7c5de93b19 100644 --- a/flow/view_holder.cc +++ b/flow/view_holder.cc @@ -9,7 +9,7 @@ namespace { using ViewHolderBindings = - std::unordered_map>; + std::unordered_map>; FML_THREAD_LOCAL fml::ThreadLocal tls_view_holder_bindings([](intptr_t value) { delete reinterpret_cast(value); @@ -47,7 +47,7 @@ fuchsia::ui::gfx::ViewProperties ToViewProperties(float width, } // namespace -namespace flow { +namespace flutter { ViewHolder::ViewHolder(fml::RefPtr ui_task_runner, fuchsia::ui::views::ViewHolderToken view_holder_token, @@ -148,4 +148,4 @@ void ViewHolder::SetProperties(double width, has_pending_properties_ = true; } -} // namespace flow +} // namespace flutter diff --git a/flow/view_holder.h b/flow/view_holder.h index 2695ab86c66..2f0e216c47b 100644 --- a/flow/view_holder.h +++ b/flow/view_holder.h @@ -21,7 +21,7 @@ #include "flutter/fml/memory/ref_counted.h" #include "flutter/fml/task_runner.h" -namespace flow { +namespace flutter { // Represents a Scenic |ViewHolder| resource that imports a |View| from another // session. @@ -70,6 +70,6 @@ class ViewHolder { FML_DISALLOW_COPY_AND_ASSIGN(ViewHolder); }; -} // namespace flow +} // namespace flutter #endif // FLUTTER_FLOW_VIEW_HOLDER_H_ diff --git a/lib/ui/compositing/scene.cc b/lib/ui/compositing/scene.cc index 4bf30e92aa4..fd3e86c7e51 100644 --- a/lib/ui/compositing/scene.cc +++ b/lib/ui/compositing/scene.cc @@ -24,7 +24,7 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Scene); DART_BIND_ALL(Scene, FOR_EACH_BINDING) -fml::RefPtr Scene::create(std::shared_ptr rootLayer, +fml::RefPtr Scene::create(std::shared_ptr rootLayer, uint32_t rasterizerTracingThreshold, bool checkerboardRasterCacheImages, bool checkerboardOffscreenLayers) { @@ -33,11 +33,11 @@ fml::RefPtr Scene::create(std::shared_ptr rootLayer, checkerboardRasterCacheImages, checkerboardOffscreenLayers); } -Scene::Scene(std::shared_ptr rootLayer, +Scene::Scene(std::shared_ptr rootLayer, uint32_t rasterizerTracingThreshold, bool checkerboardRasterCacheImages, bool checkerboardOffscreenLayers) - : m_layerTree(new flow::LayerTree()) { + : m_layerTree(new flutter::LayerTree()) { m_layerTree->set_root_layer(std::move(rootLayer)); m_layerTree->set_rasterizer_tracing_threshold(rasterizerTracingThreshold); m_layerTree->set_checkerboard_raster_cache_images( @@ -68,7 +68,7 @@ Dart_Handle Scene::toImage(uint32_t width, return Picture::RasterizeToImage(picture, width, height, raw_image_callback); } -std::unique_ptr Scene::takeLayerTree() { +std::unique_ptr Scene::takeLayerTree() { return std::move(m_layerTree); } diff --git a/lib/ui/compositing/scene.h b/lib/ui/compositing/scene.h index 7bec8f7e58e..2d280a534db 100644 --- a/lib/ui/compositing/scene.h +++ b/lib/ui/compositing/scene.h @@ -24,12 +24,12 @@ class Scene : public RefCountedDartWrappable { public: ~Scene() override; - static fml::RefPtr create(std::shared_ptr rootLayer, + static fml::RefPtr create(std::shared_ptr rootLayer, uint32_t rasterizerTracingThreshold, bool checkerboardRasterCacheImages, bool checkerboardOffscreenLayers); - std::unique_ptr takeLayerTree(); + std::unique_ptr takeLayerTree(); Dart_Handle toImage(uint32_t width, uint32_t height, @@ -40,12 +40,12 @@ class Scene : public RefCountedDartWrappable { static void RegisterNatives(tonic::DartLibraryNatives* natives); private: - explicit Scene(std::shared_ptr rootLayer, + explicit Scene(std::shared_ptr rootLayer, uint32_t rasterizerTracingThreshold, bool checkerboardRasterCacheImages, bool checkerboardOffscreenLayers); - std::unique_ptr m_layerTree; + std::unique_ptr m_layerTree; }; } // namespace flutter diff --git a/lib/ui/compositing/scene_builder.cc b/lib/ui/compositing/scene_builder.cc index 447119594f3..e442e176db5 100644 --- a/lib/ui/compositing/scene_builder.cc +++ b/lib/ui/compositing/scene_builder.cc @@ -86,7 +86,7 @@ SceneBuilder::~SceneBuilder() = default; fml::RefPtr SceneBuilder::pushTransform( tonic::Float64List& matrix4) { SkMatrix sk_matrix = ToSkMatrix(matrix4); - auto layer = std::make_shared(); + auto layer = std::make_shared(); layer->set_transform(sk_matrix); PushLayer(layer); // matrix4 has to be released before we can return another Dart object @@ -96,7 +96,7 @@ fml::RefPtr SceneBuilder::pushTransform( fml::RefPtr SceneBuilder::pushOffset(double dx, double dy) { SkMatrix sk_matrix = SkMatrix::MakeTrans(dx, dy); - auto layer = std::make_shared(); + auto layer = std::make_shared(); layer->set_transform(sk_matrix); PushLayer(layer); return EngineLayer::MakeRetained(layer); @@ -108,8 +108,8 @@ fml::RefPtr SceneBuilder::pushClipRect(double left, double bottom, int clipBehavior) { SkRect clipRect = SkRect::MakeLTRB(left, top, right, bottom); - flow::Clip clip_behavior = static_cast(clipBehavior); - auto layer = std::make_shared(clip_behavior); + flutter::Clip clip_behavior = static_cast(clipBehavior); + auto layer = std::make_shared(clip_behavior); layer->set_clip_rect(clipRect); PushLayer(layer); return EngineLayer::MakeRetained(layer); @@ -117,8 +117,8 @@ fml::RefPtr SceneBuilder::pushClipRect(double left, fml::RefPtr SceneBuilder::pushClipRRect(const RRect& rrect, int clipBehavior) { - flow::Clip clip_behavior = static_cast(clipBehavior); - auto layer = std::make_shared(clip_behavior); + flutter::Clip clip_behavior = static_cast(clipBehavior); + auto layer = std::make_shared(clip_behavior); layer->set_clip_rrect(rrect.sk_rrect); PushLayer(layer); return EngineLayer::MakeRetained(layer); @@ -126,9 +126,9 @@ fml::RefPtr SceneBuilder::pushClipRRect(const RRect& rrect, fml::RefPtr SceneBuilder::pushClipPath(const CanvasPath* path, int clipBehavior) { - flow::Clip clip_behavior = static_cast(clipBehavior); - FML_DCHECK(clip_behavior != flow::Clip::none); - auto layer = std::make_shared(clip_behavior); + flutter::Clip clip_behavior = static_cast(clipBehavior); + FML_DCHECK(clip_behavior != flutter::Clip::none); + auto layer = std::make_shared(clip_behavior); layer->set_clip_path(path->path()); PushLayer(layer); return EngineLayer::MakeRetained(layer); @@ -137,7 +137,7 @@ fml::RefPtr SceneBuilder::pushClipPath(const CanvasPath* path, fml::RefPtr SceneBuilder::pushOpacity(int alpha, double dx, double dy) { - auto layer = std::make_shared(); + auto layer = std::make_shared(); layer->set_alpha(alpha); layer->set_offset(SkPoint::Make(dx, dy)); PushLayer(layer); @@ -146,7 +146,7 @@ fml::RefPtr SceneBuilder::pushOpacity(int alpha, fml::RefPtr SceneBuilder::pushColorFilter(int color, int blendMode) { - auto layer = std::make_shared(); + auto layer = std::make_shared(); layer->set_color(static_cast(color)); layer->set_blend_mode(static_cast(blendMode)); PushLayer(layer); @@ -154,7 +154,7 @@ fml::RefPtr SceneBuilder::pushColorFilter(int color, } fml::RefPtr SceneBuilder::pushBackdropFilter(ImageFilter* filter) { - auto layer = std::make_shared(); + auto layer = std::make_shared(); layer->set_filter(filter->filter()); PushLayer(layer); return EngineLayer::MakeRetained(layer); @@ -168,7 +168,7 @@ fml::RefPtr SceneBuilder::pushShaderMask(Shader* shader, int blendMode) { SkRect rect = SkRect::MakeLTRB(maskRectLeft, maskRectTop, maskRectRight, maskRectBottom); - auto layer = std::make_shared(); + auto layer = std::make_shared(); layer->set_shader(shader->shader()); layer->set_mask_rect(rect); layer->set_blend_mode(static_cast(blendMode)); @@ -182,8 +182,8 @@ fml::RefPtr SceneBuilder::pushPhysicalShape(const CanvasPath* path, int shadow_color, int clipBehavior) { const SkPath& sk_path = path->path(); - flow::Clip clip_behavior = static_cast(clipBehavior); - auto layer = std::make_shared(clip_behavior); + flutter::Clip clip_behavior = static_cast(clipBehavior); + auto layer = std::make_shared(clip_behavior); layer->set_path(sk_path); layer->set_elevation(elevation); layer->set_color(static_cast(color)); @@ -220,7 +220,7 @@ void SceneBuilder::addPicture(double dx, SkPoint offset = SkPoint::Make(dx, dy); SkRect pictureRect = picture->picture()->cullRect(); pictureRect.offset(offset.x(), offset.y()); - auto layer = std::make_unique(); + auto layer = std::make_unique(); layer->set_offset(offset); layer->set_picture(UIDartState::CreateGPUObject(picture->picture())); layer->set_is_complex(!!(hints & 1)); @@ -237,7 +237,7 @@ void SceneBuilder::addTexture(double dx, if (!current_layer_) { return; } - auto layer = std::make_unique(); + auto layer = std::make_unique(); layer->set_offset(SkPoint::Make(dx, dy)); layer->set_size(SkSize::Make(width, height)); layer->set_texture_id(textureId); @@ -253,7 +253,7 @@ void SceneBuilder::addPlatformView(double dx, if (!current_layer_) { return; } - auto layer = std::make_unique(); + auto layer = std::make_unique(); layer->set_offset(SkPoint::Make(dx, dy)); layer->set_size(SkSize::Make(width, height)); layer->set_view_id(viewId); @@ -270,7 +270,7 @@ void SceneBuilder::addChildScene(double dx, if (!current_layer_) { return; } - auto layer = std::make_unique( + auto layer = std::make_unique( sceneHost->id(), sceneHost->use_view_holder(), SkPoint::Make(dx, dy), SkSize::Make(width, height), hitTestable); current_layer_->Add(std::move(layer)); @@ -286,7 +286,8 @@ void SceneBuilder::addPerformanceOverlay(uint64_t enabledOptions, return; } SkRect rect = SkRect::MakeLTRB(left, top, right, bottom); - auto layer = std::make_unique(enabledOptions); + auto layer = + std::make_unique(enabledOptions); layer->set_paint_bounds(rect); current_layer_->Add(std::move(layer)); } @@ -311,7 +312,7 @@ fml::RefPtr SceneBuilder::build() { return scene; } -void SceneBuilder::PushLayer(std::shared_ptr layer) { +void SceneBuilder::PushLayer(std::shared_ptr layer) { FML_DCHECK(layer); if (!root_layer_) { @@ -324,7 +325,7 @@ void SceneBuilder::PushLayer(std::shared_ptr layer) { return; } - flow::ContainerLayer* newLayer = layer.get(); + flutter::ContainerLayer* newLayer = layer.get(); current_layer_->Add(std::move(layer)); current_layer_ = newLayer; } diff --git a/lib/ui/compositing/scene_builder.h b/lib/ui/compositing/scene_builder.h index 3f33d17c435..601ca5afb29 100644 --- a/lib/ui/compositing/scene_builder.h +++ b/lib/ui/compositing/scene_builder.h @@ -108,14 +108,14 @@ class SceneBuilder : public RefCountedDartWrappable { private: SceneBuilder(); - std::shared_ptr root_layer_; - flow::ContainerLayer* current_layer_ = nullptr; + std::shared_ptr root_layer_; + flutter::ContainerLayer* current_layer_ = nullptr; int rasterizer_tracing_threshold_ = 0; bool checkerboard_raster_cache_images_ = false; bool checkerboard_offscreen_layers_ = false; - void PushLayer(std::shared_ptr layer); + void PushLayer(std::shared_ptr layer); FML_DISALLOW_COPY_AND_ASSIGN(SceneBuilder); }; diff --git a/lib/ui/compositing/scene_host.cc b/lib/ui/compositing/scene_host.cc index 4247fc247cb..84decb9a61f 100644 --- a/lib/ui/compositing/scene_host.cc +++ b/lib/ui/compositing/scene_host.cc @@ -121,7 +121,7 @@ SceneHost::SceneHost(fml::RefPtr exportTokenHandle) gpu_task_runner_->PostTask( [id = id_, handle = std::move(exportTokenHandle)]() { auto export_token = zx::eventpair(handle->ReleaseHandle()); - flow::ExportNode::Create(id, std::move(export_token)); + flutter::ExportNode::Create(id, std::move(export_token)); }); } @@ -163,9 +163,9 @@ SceneHost::SceneHost(fml::RefPtr viewHolderTokenHandle, bind_callback = std::move(bind_callback)]() { auto view_holder_token = scenic::ToViewHolderToken(zx::eventpair(handle->ReleaseHandle())); - flow::ViewHolder::Create(id, std::move(ui_task_runner), - std::move(view_holder_token), - std::move(bind_callback)); + flutter::ViewHolder::Create(id, std::move(ui_task_runner), + std::move(view_holder_token), + std::move(bind_callback)); }); } @@ -176,9 +176,11 @@ SceneHost::~SceneHost() { FML_DCHECK(bindings); bindings->erase(id_); - gpu_task_runner_->PostTask([id = id_]() { flow::ViewHolder::Destroy(id); }); + gpu_task_runner_->PostTask( + [id = id_]() { flutter::ViewHolder::Destroy(id); }); } else { - gpu_task_runner_->PostTask([id = id_]() { flow::ExportNode::Destroy(id); }); + gpu_task_runner_->PostTask( + [id = id_]() { flutter::ExportNode::Destroy(id); }); } } @@ -217,7 +219,7 @@ void SceneHost::setProperties(double width, gpu_task_runner_->PostTask([id = id_, width, height, insetTop, insetRight, insetBottom, insetLeft, focusable]() { - auto* view_holder = flow::ViewHolder::FromId(id); + auto* view_holder = flutter::ViewHolder::FromId(id); FML_DCHECK(view_holder); view_holder->SetProperties(width, height, insetTop, insetRight, insetBottom, diff --git a/lib/ui/io_manager.h b/lib/ui/io_manager.h index 060f3e4ec8d..28cf4f90880 100644 --- a/lib/ui/io_manager.h +++ b/lib/ui/io_manager.h @@ -19,7 +19,7 @@ class IOManager { virtual fml::WeakPtr GetResourceContext() const = 0; - virtual fml::RefPtr GetSkiaUnrefQueue() const = 0; + virtual fml::RefPtr GetSkiaUnrefQueue() const = 0; }; } // namespace flutter diff --git a/lib/ui/painting/canvas.cc b/lib/ui/painting/canvas.cc index 803ae8735be..2fc9f901f84 100644 --- a/lib/ui/painting/canvas.cc +++ b/lib/ui/painting/canvas.cc @@ -419,8 +419,8 @@ void Canvas::drawShadow(const CanvasPath* path, ToDart("Canvas.drawShader called with non-genuine Path.")); SkScalar dpr = UIDartState::Current()->window()->viewport_metrics().device_pixel_ratio; - flow::PhysicalShapeLayer::DrawShadow(canvas_, path->path(), color, elevation, - transparentOccluder, dpr); + flutter::PhysicalShapeLayer::DrawShadow(canvas_, path->path(), color, + elevation, transparentOccluder, dpr); } void Canvas::Clear() { diff --git a/lib/ui/painting/codec.cc b/lib/ui/painting/codec.cc index 600d9ad26e1..bf327739a67 100644 --- a/lib/ui/painting/codec.cc +++ b/lib/ui/painting/codec.cc @@ -81,7 +81,7 @@ static sk_sp DecodeImage(fml::WeakPtr context, fml::RefPtr InitCodec(fml::WeakPtr context, sk_sp buffer, - fml::RefPtr unref_queue, + fml::RefPtr unref_queue, const float decodedCacheRatioCap, size_t trace_id) { TRACE_FLOW_STEP("flutter", kInitCodecTraceTag, trace_id); @@ -117,7 +117,7 @@ fml::RefPtr InitCodecUncompressed( fml::WeakPtr context, sk_sp buffer, ImageInfo image_info, - fml::RefPtr unref_queue, + fml::RefPtr unref_queue, const float decodedCacheRatioCap, size_t trace_id) { TRACE_FLOW_STEP("flutter", kInitCodecTraceTag, trace_id); @@ -147,7 +147,7 @@ fml::RefPtr InitCodecUncompressed( void InitCodecAndInvokeCodecCallback( fml::RefPtr ui_task_runner, fml::WeakPtr context, - fml::RefPtr unref_queue, + fml::RefPtr unref_queue, std::unique_ptr callback, sk_sp buffer, std::unique_ptr image_info, @@ -468,7 +468,7 @@ void MultiFrameCodec::GetNextFrameAndInvokeCallback( std::unique_ptr callback, fml::RefPtr ui_task_runner, fml::WeakPtr resourceContext, - fml::RefPtr unref_queue, + fml::RefPtr unref_queue, size_t trace_id) { fml::RefPtr frameInfo = NULL; sk_sp skImage = GetNextFrameImage(resourceContext); diff --git a/lib/ui/painting/codec.h b/lib/ui/painting/codec.h index 777b77ea9a8..fa14cd63cae 100644 --- a/lib/ui/painting/codec.h +++ b/lib/ui/painting/codec.h @@ -52,7 +52,7 @@ class MultiFrameCodec : public Codec { std::unique_ptr callback, fml::RefPtr ui_task_runner, fml::WeakPtr resourceContext, - fml::RefPtr unref_queue, + fml::RefPtr unref_queue, size_t trace_id); const std::unique_ptr codec_; diff --git a/lib/ui/painting/engine_layer.cc b/lib/ui/painting/engine_layer.cc index 98b8b0ae3b2..7ac9c98497f 100644 --- a/lib/ui/painting/engine_layer.cc +++ b/lib/ui/painting/engine_layer.cc @@ -15,7 +15,7 @@ using tonic::ToDart; namespace flutter { -EngineLayer::EngineLayer(std::shared_ptr layer) +EngineLayer::EngineLayer(std::shared_ptr layer) : layer_(layer) {} EngineLayer::~EngineLayer() = default; diff --git a/lib/ui/painting/engine_layer.h b/lib/ui/painting/engine_layer.h index 653d559b9c0..1dc565c5193 100644 --- a/lib/ui/painting/engine_layer.h +++ b/lib/ui/painting/engine_layer.h @@ -26,17 +26,17 @@ class EngineLayer : public RefCountedDartWrappable { size_t GetAllocationSize() override; static fml::RefPtr MakeRetained( - std::shared_ptr layer) { + std::shared_ptr layer) { return fml::MakeRefCounted(layer); } static void RegisterNatives(tonic::DartLibraryNatives* natives); - std::shared_ptr Layer() const { return layer_; } + std::shared_ptr Layer() const { return layer_; } private: - explicit EngineLayer(std::shared_ptr layer); - std::shared_ptr layer_; + explicit EngineLayer(std::shared_ptr layer); + std::shared_ptr layer_; FML_FRIEND_MAKE_REF_COUNTED(EngineLayer); }; diff --git a/lib/ui/painting/image.h b/lib/ui/painting/image.h index aef394b7131..516a2e5d59c 100644 --- a/lib/ui/painting/image.h +++ b/lib/ui/painting/image.h @@ -35,7 +35,7 @@ class CanvasImage final : public RefCountedDartWrappable { void dispose(); sk_sp image() const { return image_.get(); } - void set_image(flow::SkiaGPUObject image) { + void set_image(flutter::SkiaGPUObject image) { image_ = std::move(image); } @@ -46,7 +46,7 @@ class CanvasImage final : public RefCountedDartWrappable { private: CanvasImage(); - flow::SkiaGPUObject image_; + flutter::SkiaGPUObject image_; }; } // namespace flutter diff --git a/lib/ui/painting/picture.cc b/lib/ui/painting/picture.cc index 442b2c1702c..98c37edc115 100644 --- a/lib/ui/painting/picture.cc +++ b/lib/ui/painting/picture.cc @@ -26,11 +26,12 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Picture); DART_BIND_ALL(Picture, FOR_EACH_BINDING) -fml::RefPtr Picture::Create(flow::SkiaGPUObject picture) { +fml::RefPtr Picture::Create( + flutter::SkiaGPUObject picture) { return fml::MakeRefCounted(std::move(picture)); } -Picture::Picture(flow::SkiaGPUObject picture) +Picture::Picture(flutter::SkiaGPUObject picture) : picture_(std::move(picture)) {} Picture::~Picture() = default; diff --git a/lib/ui/painting/picture.h b/lib/ui/painting/picture.h index b5c329537de..a800f920c48 100644 --- a/lib/ui/painting/picture.h +++ b/lib/ui/painting/picture.h @@ -23,7 +23,7 @@ class Picture : public RefCountedDartWrappable { public: ~Picture() override; - static fml::RefPtr Create(flow::SkiaGPUObject picture); + static fml::RefPtr Create(flutter::SkiaGPUObject picture); sk_sp picture() const { return picture_.get(); } @@ -43,9 +43,9 @@ class Picture : public RefCountedDartWrappable { Dart_Handle raw_image_callback); private: - explicit Picture(flow::SkiaGPUObject picture); + explicit Picture(flutter::SkiaGPUObject picture); - flow::SkiaGPUObject picture_; + flutter::SkiaGPUObject picture_; }; } // namespace flutter diff --git a/lib/ui/painting/shader.cc b/lib/ui/painting/shader.cc index c426e09b8b5..c6f0e6b5617 100644 --- a/lib/ui/painting/shader.cc +++ b/lib/ui/painting/shader.cc @@ -10,7 +10,7 @@ namespace flutter { IMPLEMENT_WRAPPERTYPEINFO(ui, Shader); -Shader::Shader(flow::SkiaGPUObject shader) +Shader::Shader(flutter::SkiaGPUObject shader) : shader_(std::move(shader)) {} Shader::~Shader() = default; diff --git a/lib/ui/painting/shader.h b/lib/ui/painting/shader.h index 8e268c1ac74..cb9043ae0b4 100644 --- a/lib/ui/painting/shader.h +++ b/lib/ui/painting/shader.h @@ -21,15 +21,15 @@ class Shader : public RefCountedDartWrappable { sk_sp shader() { return shader_.get(); } - void set_shader(flow::SkiaGPUObject shader) { + void set_shader(flutter::SkiaGPUObject shader) { shader_ = std::move(shader); } protected: - Shader(flow::SkiaGPUObject shader = {}); + Shader(flutter::SkiaGPUObject shader = {}); private: - flow::SkiaGPUObject shader_; + flutter::SkiaGPUObject shader_; }; } // namespace flutter diff --git a/lib/ui/ui_dart_state.cc b/lib/ui/ui_dart_state.cc index 58f9b77a4bf..b26e01afb16 100644 --- a/lib/ui/ui_dart_state.cc +++ b/lib/ui/ui_dart_state.cc @@ -78,7 +78,7 @@ const TaskRunners& UIDartState::GetTaskRunners() const { return task_runners_; } -fml::RefPtr UIDartState::GetSkiaUnrefQueue() const { +fml::RefPtr UIDartState::GetSkiaUnrefQueue() const { if (!io_manager_) { return nullptr; } diff --git a/lib/ui/ui_dart_state.h b/lib/ui/ui_dart_state.h index b32cf6588e7..4f9c33387ec 100644 --- a/lib/ui/ui_dart_state.h +++ b/lib/ui/ui_dart_state.h @@ -47,7 +47,7 @@ class UIDartState : public tonic::DartState { void FlushMicrotasksNow(); - fml::RefPtr GetSkiaUnrefQueue() const; + fml::RefPtr GetSkiaUnrefQueue() const; fml::WeakPtr GetSnapshotDelegate() const; @@ -61,7 +61,7 @@ class UIDartState : public tonic::DartState { const std::string& stack_trace); template - static flow::SkiaGPUObject CreateGPUObject(sk_sp object) { + static flutter::SkiaGPUObject CreateGPUObject(sk_sp object) { if (!object) { return {}; } diff --git a/runtime/runtime_delegate.h b/runtime/runtime_delegate.h index b62d39a0ed7..8dd69dbefb6 100644 --- a/runtime/runtime_delegate.h +++ b/runtime/runtime_delegate.h @@ -23,7 +23,7 @@ class RuntimeDelegate { virtual void ScheduleFrame(bool regenerate_layer_tree = true) = 0; - virtual void Render(std::unique_ptr layer_tree) = 0; + virtual void Render(std::unique_ptr layer_tree) = 0; virtual void UpdateSemantics(SemanticsNodeUpdates update, CustomAccessibilityActionUpdates actions) = 0; diff --git a/shell/common/animator.cc b/shell/common/animator.cc index 0926599e918..cbf16e8b3ba 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -157,7 +157,7 @@ void Animator::BeginFrame(fml::TimePoint frame_start_time, } } -void Animator::Render(std::unique_ptr layer_tree) { +void Animator::Render(std::unique_ptr layer_tree) { if (dimension_change_pending_ && layer_tree->frame_size() != last_layer_tree_size_) { dimension_change_pending_ = false; diff --git a/shell/common/animator.h b/shell/common/animator.h index e0cd52bf7bc..c5bd8b5b147 100644 --- a/shell/common/animator.h +++ b/shell/common/animator.h @@ -27,7 +27,7 @@ class Animator final { virtual void OnAnimatorNotifyIdle(int64_t deadline) = 0; virtual void OnAnimatorDraw( - fml::RefPtr> pipeline) = 0; + fml::RefPtr> pipeline) = 0; virtual void OnAnimatorDrawLastLayerTree() = 0; }; @@ -42,7 +42,7 @@ class Animator final { void RequestFrame(bool regenerate_layer_tree = true); - void Render(std::unique_ptr layer_tree); + void Render(std::unique_ptr layer_tree); void Start(); @@ -55,7 +55,7 @@ class Animator final { void EnqueueTraceFlowId(uint64_t trace_flow_id); private: - using LayerTreePipeline = Pipeline; + using LayerTreePipeline = Pipeline; void BeginFrame(fml::TimePoint frame_start_time, fml::TimePoint frame_target_time); diff --git a/shell/common/engine.cc b/shell/common/engine.cc index fdbd6bf7a8f..a427df24dae 100644 --- a/shell/common/engine.cc +++ b/shell/common/engine.cc @@ -397,7 +397,7 @@ void Engine::ScheduleFrame(bool regenerate_layer_tree) { animator_->RequestFrame(regenerate_layer_tree); } -void Engine::Render(std::unique_ptr layer_tree) { +void Engine::Render(std::unique_ptr layer_tree) { if (!layer_tree) return; diff --git a/shell/common/engine.h b/shell/common/engine.h index cd2c32b8403..e32ed11b65f 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -137,7 +137,7 @@ class Engine final : public RuntimeDelegate { std::string DefaultRouteName() override; // |RuntimeDelegate| - void Render(std::unique_ptr layer_tree) override; + void Render(std::unique_ptr layer_tree) override; // |RuntimeDelegate| void UpdateSemantics(SemanticsNodeUpdates update, diff --git a/shell/common/platform_view.cc b/shell/common/platform_view.cc index 5de50e3d9b4..4a84f27f4e4 100644 --- a/shell/common/platform_view.cc +++ b/shell/common/platform_view.cc @@ -102,7 +102,7 @@ void PlatformView::HandlePlatformMessage(fml::RefPtr message) { void PlatformView::OnPreEngineRestart() const {} -void PlatformView::RegisterTexture(std::shared_ptr texture) { +void PlatformView::RegisterTexture(std::shared_ptr texture) { delegate_.OnPlatformViewRegisterTexture(std::move(texture)); } diff --git a/shell/common/platform_view.h b/shell/common/platform_view.h index d76e8fbb0eb..c8e44836afe 100644 --- a/shell/common/platform_view.h +++ b/shell/common/platform_view.h @@ -54,7 +54,7 @@ class PlatformView { virtual void OnPlatformViewSetAccessibilityFeatures(int32_t flags) = 0; virtual void OnPlatformViewRegisterTexture( - std::shared_ptr texture) = 0; + std::shared_ptr texture) = 0; virtual void OnPlatformViewUnregisterTexture(int64_t texture_id) = 0; @@ -106,7 +106,7 @@ class PlatformView { void DispatchPointerDataPacket(std::unique_ptr packet); // Called once per texture, on the platform thread. - void RegisterTexture(std::shared_ptr texture); + void RegisterTexture(std::shared_ptr texture); // Called once per texture, on the platform thread. void UnregisterTexture(int64_t texture_id); diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 80a93ad3d87..07c518c971d 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -24,11 +24,11 @@ static constexpr std::chrono::milliseconds kSkiaCleanupExpiration(15000); Rasterizer::Rasterizer(TaskRunners task_runners) : Rasterizer(std::move(task_runners), - std::make_unique()) {} + std::make_unique()) {} Rasterizer::Rasterizer( TaskRunners task_runners, - std::unique_ptr compositor_context) + std::unique_ptr compositor_context) : task_runners_(std::move(task_runners)), compositor_context_(std::move(compositor_context)), weak_factory_(this) { @@ -56,11 +56,11 @@ void Rasterizer::Teardown() { last_layer_tree_.reset(); } -flow::TextureRegistry* Rasterizer::GetTextureRegistry() { +flutter::TextureRegistry* Rasterizer::GetTextureRegistry() { return &compositor_context_->texture_registry(); } -flow::LayerTree* Rasterizer::GetLastLayerTree() { +flutter::LayerTree* Rasterizer::GetLastLayerTree() { return last_layer_tree_.get(); } @@ -71,10 +71,10 @@ void Rasterizer::DrawLastLayerTree() { DrawToSurface(*last_layer_tree_); } -void Rasterizer::Draw(fml::RefPtr> pipeline) { +void Rasterizer::Draw(fml::RefPtr> pipeline) { TRACE_EVENT0("flutter", "GPURasterizer::Draw"); - Pipeline::Consumer consumer = + Pipeline::Consumer consumer = std::bind(&Rasterizer::DoDraw, this, std::placeholders::_1); // Consume as many pipeline items as possible. But yield the event loop @@ -146,7 +146,7 @@ sk_sp Rasterizer::MakeRasterSnapshot(sk_sp picture, return nullptr; } -void Rasterizer::DoDraw(std::unique_ptr layer_tree) { +void Rasterizer::DoDraw(std::unique_ptr layer_tree) { if (!layer_tree || !surface_) { return; } @@ -166,7 +166,7 @@ void Rasterizer::DoDraw(std::unique_ptr layer_tree) { } } -bool Rasterizer::DrawToSurface(flow::LayerTree& layer_tree) { +bool Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) { FML_DCHECK(surface_); auto frame = surface_->AcquireFrame(layer_tree.frame_size()); @@ -213,8 +213,8 @@ static sk_sp SerializeTypeface(SkTypeface* typeface, void* ctx) { } static sk_sp ScreenshotLayerTreeAsPicture( - flow::LayerTree* tree, - flow::CompositorContext& compositor_context) { + flutter::LayerTree* tree, + flutter::CompositorContext& compositor_context) { FML_DCHECK(tree != nullptr); SkPictureRecorder recorder; recorder.beginRecording( @@ -256,8 +256,8 @@ static sk_sp CreateSnapshotSurface(GrContext* surface_context, } static sk_sp ScreenshotLayerTreeAsImage( - flow::LayerTree* tree, - flow::CompositorContext& compositor_context, + flutter::LayerTree* tree, + flutter::CompositorContext& compositor_context, GrContext* surface_context, bool compressed) { // Attempt to create a snapshot surface depending on whether we have access to diff --git a/shell/common/rasterizer.h b/shell/common/rasterizer.h index f9d472b3808..a34e511d51c 100644 --- a/shell/common/rasterizer.h +++ b/shell/common/rasterizer.h @@ -24,7 +24,7 @@ class Rasterizer final : public SnapshotDelegate { Rasterizer(TaskRunners task_runners); Rasterizer(TaskRunners task_runners, - std::unique_ptr compositor_context); + std::unique_ptr compositor_context); ~Rasterizer(); @@ -36,13 +36,13 @@ class Rasterizer final : public SnapshotDelegate { fml::WeakPtr GetSnapshotDelegate() const; - flow::LayerTree* GetLastLayerTree(); + flutter::LayerTree* GetLastLayerTree(); void DrawLastLayerTree(); - flow::TextureRegistry* GetTextureRegistry(); + flutter::TextureRegistry* GetTextureRegistry(); - void Draw(fml::RefPtr> pipeline); + void Draw(fml::RefPtr> pipeline); enum class ScreenshotType { SkiaPicture, @@ -69,7 +69,7 @@ class Rasterizer final : public SnapshotDelegate { // the surface on the GPU task runner. void SetNextFrameCallback(fml::closure callback); - flow::CompositorContext* compositor_context() { + flutter::CompositorContext* compositor_context() { return compositor_context_.get(); } @@ -78,8 +78,8 @@ class Rasterizer final : public SnapshotDelegate { private: TaskRunners task_runners_; std::unique_ptr surface_; - std::unique_ptr compositor_context_; - std::unique_ptr last_layer_tree_; + std::unique_ptr compositor_context_; + std::unique_ptr last_layer_tree_; fml::closure next_frame_callback_; fml::WeakPtrFactory weak_factory_; @@ -87,9 +87,9 @@ class Rasterizer final : public SnapshotDelegate { sk_sp MakeRasterSnapshot(sk_sp picture, SkISize picture_size) override; - void DoDraw(std::unique_ptr layer_tree); + void DoDraw(std::unique_ptr layer_tree); - bool DrawToSurface(flow::LayerTree& layer_tree); + bool DrawToSurface(flutter::LayerTree& layer_tree); void FireNextFrameCallbackIfPresent(); diff --git a/shell/common/shell.cc b/shell/common/shell.cc index e62dd13a2e8..5a33f0d388e 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -674,7 +674,7 @@ void Shell::OnPlatformViewSetAccessibilityFeatures(int32_t flags) { // |PlatformView::Delegate| void Shell::OnPlatformViewRegisterTexture( - std::shared_ptr texture) { + std::shared_ptr texture) { FML_DCHECK(is_setup_); FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread()); @@ -768,7 +768,7 @@ void Shell::OnAnimatorNotifyIdle(int64_t deadline) { } // |Animator::Delegate| -void Shell::OnAnimatorDraw(fml::RefPtr> pipeline) { +void Shell::OnAnimatorDraw(fml::RefPtr> pipeline) { FML_DCHECK(is_setup_); task_runners_.GetGPUTaskRunner()->PostTask( diff --git a/shell/common/shell.h b/shell/common/shell.h index 09614b6941c..948afb1e318 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -151,7 +151,7 @@ class Shell final : public PlatformView::Delegate, // |PlatformView::Delegate| void OnPlatformViewRegisterTexture( - std::shared_ptr texture) override; + std::shared_ptr texture) override; // |PlatformView::Delegate| void OnPlatformViewUnregisterTexture(int64_t texture_id) override; @@ -169,7 +169,8 @@ class Shell final : public PlatformView::Delegate, void OnAnimatorNotifyIdle(int64_t deadline) override; // |Animator::Delegate| - void OnAnimatorDraw(fml::RefPtr> pipeline) override; + void OnAnimatorDraw( + fml::RefPtr> pipeline) override; // |Animator::Delegate| void OnAnimatorDrawLastLayerTree() override; diff --git a/shell/common/shell_io_manager.cc b/shell/common/shell_io_manager.cc index 2ca9cb25a1f..f1155c2e883 100644 --- a/shell/common/shell_io_manager.cc +++ b/shell/common/shell_io_manager.cc @@ -50,7 +50,7 @@ ShellIOManager::ShellIOManager( resource_context_ ? std::make_unique>( resource_context_.get()) : nullptr), - unref_queue_(fml::MakeRefCounted( + unref_queue_(fml::MakeRefCounted( std::move(unref_queue_task_runner), fml::TimeDelta::FromMilliseconds(250))), weak_factory_(this) { @@ -93,7 +93,7 @@ void ShellIOManager::UpdateResourceContext(sk_sp resource_context) { : nullptr; } -fml::RefPtr ShellIOManager::GetSkiaUnrefQueue() const { +fml::RefPtr ShellIOManager::GetSkiaUnrefQueue() const { return unref_queue_; } diff --git a/shell/common/shell_io_manager.h b/shell/common/shell_io_manager.h index 49a93899c52..11efd343437 100644 --- a/shell/common/shell_io_manager.h +++ b/shell/common/shell_io_manager.h @@ -42,7 +42,7 @@ class ShellIOManager final : public IOManager { // resource context, but may be called if the Dart VM is restarted. void UpdateResourceContext(sk_sp resource_context); - fml::RefPtr GetSkiaUnrefQueue() const override; + fml::RefPtr GetSkiaUnrefQueue() const override; fml::WeakPtr GetWeakPtr(); @@ -53,7 +53,7 @@ class ShellIOManager final : public IOManager { resource_context_weak_factory_; // Unref queue management. - fml::RefPtr unref_queue_; + fml::RefPtr unref_queue_; fml::WeakPtrFactory weak_factory_; diff --git a/shell/common/surface.cc b/shell/common/surface.cc index ce334311002..b8a77ca1811 100644 --- a/shell/common/surface.cc +++ b/shell/common/surface.cc @@ -56,7 +56,7 @@ Surface::Surface() = default; Surface::~Surface() = default; -flow::ExternalViewEmbedder* Surface::GetExternalViewEmbedder() { +flutter::ExternalViewEmbedder* Surface::GetExternalViewEmbedder() { return nullptr; } diff --git a/shell/common/surface.h b/shell/common/surface.h index f3c5db8bb4f..06bebed09c5 100644 --- a/shell/common/surface.h +++ b/shell/common/surface.h @@ -55,7 +55,7 @@ class Surface { virtual GrContext* GetContext() = 0; - virtual flow::ExternalViewEmbedder* GetExternalViewEmbedder(); + virtual flutter::ExternalViewEmbedder* GetExternalViewEmbedder(); virtual bool MakeRenderContextCurrent(); diff --git a/shell/gpu/gpu_surface_gl.cc b/shell/gpu/gpu_surface_gl.cc index 98011dfc72d..f92c34cad76 100644 --- a/shell/gpu/gpu_surface_gl.cc +++ b/shell/gpu/gpu_surface_gl.cc @@ -320,7 +320,7 @@ GrContext* GPUSurfaceGL::GetContext() { } // |Surface| -flow::ExternalViewEmbedder* GPUSurfaceGL::GetExternalViewEmbedder() { +flutter::ExternalViewEmbedder* GPUSurfaceGL::GetExternalViewEmbedder() { return delegate_->GetExternalViewEmbedder(); } diff --git a/shell/gpu/gpu_surface_gl.h b/shell/gpu/gpu_surface_gl.h index 2c8e9afc6fe..9ad53f6228f 100644 --- a/shell/gpu/gpu_surface_gl.h +++ b/shell/gpu/gpu_surface_gl.h @@ -39,7 +39,7 @@ class GPUSurfaceGL : public Surface { GrContext* GetContext() override; // |Surface| - flow::ExternalViewEmbedder* GetExternalViewEmbedder() override; + flutter::ExternalViewEmbedder* GetExternalViewEmbedder() override; // |Surface| bool MakeRenderContextCurrent() override; diff --git a/shell/gpu/gpu_surface_gl_delegate.cc b/shell/gpu/gpu_surface_gl_delegate.cc index 92f30039aab..4511141bbb8 100644 --- a/shell/gpu/gpu_surface_gl_delegate.cc +++ b/shell/gpu/gpu_surface_gl_delegate.cc @@ -22,7 +22,7 @@ SkMatrix GPUSurfaceGLDelegate::GLContextSurfaceTransformation() const { return matrix; } -flow::ExternalViewEmbedder* GPUSurfaceGLDelegate::GetExternalViewEmbedder() { +flutter::ExternalViewEmbedder* GPUSurfaceGLDelegate::GetExternalViewEmbedder() { return nullptr; } diff --git a/shell/gpu/gpu_surface_gl_delegate.h b/shell/gpu/gpu_surface_gl_delegate.h index 0a8b9d5eca8..0a6b33d2248 100644 --- a/shell/gpu/gpu_surface_gl_delegate.h +++ b/shell/gpu/gpu_surface_gl_delegate.h @@ -44,7 +44,7 @@ class GPUSurfaceGLDelegate { // Get a reference to the external views embedder. This happens on the same // thread that the renderer is operating on. - virtual flow::ExternalViewEmbedder* GetExternalViewEmbedder(); + virtual flutter::ExternalViewEmbedder* GetExternalViewEmbedder(); sk_sp GetGLInterface() const; diff --git a/shell/gpu/gpu_surface_software.cc b/shell/gpu/gpu_surface_software.cc index 78fba549190..399a9a46c52 100644 --- a/shell/gpu/gpu_surface_software.cc +++ b/shell/gpu/gpu_surface_software.cc @@ -9,7 +9,7 @@ namespace flutter { -flow::ExternalViewEmbedder* +flutter::ExternalViewEmbedder* GPUSurfaceSoftwareDelegate::GetExternalViewEmbedder() { return nullptr; } @@ -81,7 +81,7 @@ GrContext* GPUSurfaceSoftware::GetContext() { } // |Surface| -flow::ExternalViewEmbedder* GPUSurfaceSoftware::GetExternalViewEmbedder() { +flutter::ExternalViewEmbedder* GPUSurfaceSoftware::GetExternalViewEmbedder() { return delegate_->GetExternalViewEmbedder(); } diff --git a/shell/gpu/gpu_surface_software.h b/shell/gpu/gpu_surface_software.h index f544fd111da..ccf2ef11b5c 100644 --- a/shell/gpu/gpu_surface_software.h +++ b/shell/gpu/gpu_surface_software.h @@ -19,7 +19,7 @@ class GPUSurfaceSoftwareDelegate { virtual bool PresentBackingStore(sk_sp backing_store) = 0; - virtual flow::ExternalViewEmbedder* GetExternalViewEmbedder(); + virtual flutter::ExternalViewEmbedder* GetExternalViewEmbedder(); }; class GPUSurfaceSoftware : public Surface { @@ -41,7 +41,7 @@ class GPUSurfaceSoftware : public Surface { GrContext* GetContext() override; // |Surface| - flow::ExternalViewEmbedder* GetExternalViewEmbedder() override; + flutter::ExternalViewEmbedder* GetExternalViewEmbedder() override; private: GPUSurfaceSoftwareDelegate* delegate_; diff --git a/shell/platform/android/android_external_texture_gl.h b/shell/platform/android/android_external_texture_gl.h index 4f2514a2d51..9ce87b3255b 100644 --- a/shell/platform/android/android_external_texture_gl.h +++ b/shell/platform/android/android_external_texture_gl.h @@ -11,7 +11,7 @@ namespace flutter { -class AndroidExternalTextureGL : public flow::Texture { +class AndroidExternalTextureGL : public flutter::Texture { public: AndroidExternalTextureGL( int64_t id, diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index 0f4855d0d0e..0c89e580311 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -179,7 +179,7 @@ std::vector FlutterPlatformViewsController::GetCurrentCanvases() { SkCanvas* FlutterPlatformViewsController::CompositeEmbeddedView( int view_id, - const flow::EmbeddedViewParams& params) { + const flutter::EmbeddedViewParams& params) { // TODO(amirh): assert that this is running on the platform thread once we support the iOS // embedded views thread configuration. // TODO(amirh): do nothing if the params didn't change. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h index 62921aadbee..aaab1720b76 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h @@ -67,7 +67,7 @@ class FlutterPlatformViewsController { std::vector GetCurrentCanvases(); - SkCanvas* CompositeEmbeddedView(int view_id, const flow::EmbeddedViewParams& params); + SkCanvas* CompositeEmbeddedView(int view_id, const flutter::EmbeddedViewParams& params); // Discards all platform views instances and auxiliary resources. void Reset(); diff --git a/shell/platform/darwin/ios/ios_external_texture_gl.h b/shell/platform/darwin/ios/ios_external_texture_gl.h index 360de25a1ce..3c15ac91482 100644 --- a/shell/platform/darwin/ios/ios_external_texture_gl.h +++ b/shell/platform/darwin/ios/ios_external_texture_gl.h @@ -11,7 +11,7 @@ namespace flutter { -class IOSExternalTextureGL : public flow::Texture { +class IOSExternalTextureGL : public flutter::Texture { public: IOSExternalTextureGL(int64_t textureId, NSObject* externalTexture); diff --git a/shell/platform/darwin/ios/ios_surface_gl.h b/shell/platform/darwin/ios/ios_surface_gl.h index 116033fda19..e0a2f52e2d9 100644 --- a/shell/platform/darwin/ios/ios_surface_gl.h +++ b/shell/platform/darwin/ios/ios_surface_gl.h @@ -18,7 +18,7 @@ namespace flutter { class IOSSurfaceGL : public IOSSurface, public GPUSurfaceGLDelegate, - public flow::ExternalViewEmbedder { + public flutter::ExternalViewEmbedder { public: IOSSurfaceGL(std::shared_ptr context, fml::scoped_nsobject layer, @@ -49,21 +49,21 @@ class IOSSurfaceGL : public IOSSurface, bool UseOffscreenSurface() const override; // |GPUSurfaceGLDelegate| - flow::ExternalViewEmbedder* GetExternalViewEmbedder() override; + flutter::ExternalViewEmbedder* GetExternalViewEmbedder() override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| void BeginFrame(SkISize frame_size) override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| void PrerollCompositeEmbeddedView(int view_id) override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| std::vector GetCurrentCanvases() override; - // |flow::ExternalViewEmbedder| - SkCanvas* CompositeEmbeddedView(int view_id, const flow::EmbeddedViewParams& params) override; + // |flutter::ExternalViewEmbedder| + SkCanvas* CompositeEmbeddedView(int view_id, const flutter::EmbeddedViewParams& params) override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| bool SubmitFrame(GrContext* context) override; private: diff --git a/shell/platform/darwin/ios/ios_surface_gl.mm b/shell/platform/darwin/ios/ios_surface_gl.mm index 0973dbfeb4f..f9279cc5116 100644 --- a/shell/platform/darwin/ios/ios_surface_gl.mm +++ b/shell/platform/darwin/ios/ios_surface_gl.mm @@ -74,7 +74,7 @@ bool IOSSurfaceGL::GLContextPresent() { return IsValid() && render_target_->PresentRenderBuffer(); } -flow::ExternalViewEmbedder* IOSSurfaceGL::GetExternalViewEmbedder() { +flutter::ExternalViewEmbedder* IOSSurfaceGL::GetExternalViewEmbedder() { if (IsIosEmbeddedViewsPreviewEnabled()) { return this; } else { @@ -101,7 +101,8 @@ std::vector IOSSurfaceGL::GetCurrentCanvases() { return platform_views_controller->GetCurrentCanvases(); } -SkCanvas* IOSSurfaceGL::CompositeEmbeddedView(int view_id, const flow::EmbeddedViewParams& params) { +SkCanvas* IOSSurfaceGL::CompositeEmbeddedView(int view_id, + const flutter::EmbeddedViewParams& params) { FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); FML_CHECK(platform_views_controller != nullptr); return platform_views_controller->CompositeEmbeddedView(view_id, params); diff --git a/shell/platform/darwin/ios/ios_surface_software.h b/shell/platform/darwin/ios/ios_surface_software.h index c45342a3dac..bcb5b6210bf 100644 --- a/shell/platform/darwin/ios/ios_surface_software.h +++ b/shell/platform/darwin/ios/ios_surface_software.h @@ -17,7 +17,7 @@ namespace flutter { class IOSSurfaceSoftware final : public IOSSurface, public GPUSurfaceSoftwareDelegate, - public flow::ExternalViewEmbedder { + public flutter::ExternalViewEmbedder { public: IOSSurfaceSoftware(fml::scoped_nsobject layer, FlutterPlatformViewsController* platform_views_controller); @@ -43,21 +43,21 @@ class IOSSurfaceSoftware final : public IOSSurface, bool PresentBackingStore(sk_sp backing_store) override; // |GPUSurfaceSoftwareDelegate| - flow::ExternalViewEmbedder* GetExternalViewEmbedder() override; + flutter::ExternalViewEmbedder* GetExternalViewEmbedder() override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| void BeginFrame(SkISize frame_size) override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| void PrerollCompositeEmbeddedView(int view_id) override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| std::vector GetCurrentCanvases() override; - // |flow::ExternalViewEmbedder| - SkCanvas* CompositeEmbeddedView(int view_id, const flow::EmbeddedViewParams& params) override; + // |flutter::ExternalViewEmbedder| + SkCanvas* CompositeEmbeddedView(int view_id, const flutter::EmbeddedViewParams& params) override; - // |flow::ExternalViewEmbedder| + // |flutter::ExternalViewEmbedder| bool SubmitFrame(GrContext* context) override; private: diff --git a/shell/platform/darwin/ios/ios_surface_software.mm b/shell/platform/darwin/ios/ios_surface_software.mm index 2731ad9c07d..32cb5a2bbee 100644 --- a/shell/platform/darwin/ios/ios_surface_software.mm +++ b/shell/platform/darwin/ios/ios_surface_software.mm @@ -127,7 +127,7 @@ bool IOSSurfaceSoftware::PresentBackingStore(sk_sp backing_store) { return true; } -flow::ExternalViewEmbedder* IOSSurfaceSoftware::GetExternalViewEmbedder() { +flutter::ExternalViewEmbedder* IOSSurfaceSoftware::GetExternalViewEmbedder() { if (IsIosEmbeddedViewsPreviewEnabled()) { return this; } else { @@ -154,7 +154,7 @@ std::vector IOSSurfaceSoftware::GetCurrentCanvases() { } SkCanvas* IOSSurfaceSoftware::CompositeEmbeddedView(int view_id, - const flow::EmbeddedViewParams& params) { + const flutter::EmbeddedViewParams& params) { FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); FML_CHECK(platform_views_controller != nullptr); return platform_views_controller->CompositeEmbeddedView(view_id, params); diff --git a/shell/platform/embedder/embedder_external_texture_gl.cc b/shell/platform/embedder/embedder_external_texture_gl.cc index d4cdd88f3ae..b9857ae4ee3 100644 --- a/shell/platform/embedder/embedder_external_texture_gl.cc +++ b/shell/platform/embedder/embedder_external_texture_gl.cc @@ -17,7 +17,7 @@ EmbedderExternalTextureGL::EmbedderExternalTextureGL( EmbedderExternalTextureGL::~EmbedderExternalTextureGL() = default; -// |flow::Texture| +// |flutter::Texture| void EmbedderExternalTextureGL::Paint(SkCanvas& canvas, const SkRect& bounds, bool freeze, @@ -35,13 +35,13 @@ void EmbedderExternalTextureGL::Paint(SkCanvas& canvas, } } -// |flow::Texture| +// |flutter::Texture| void EmbedderExternalTextureGL::OnGrContextCreated() {} -// |flow::Texture| +// |flutter::Texture| void EmbedderExternalTextureGL::OnGrContextDestroyed() {} -// |flow::Texture| +// |flutter::Texture| void EmbedderExternalTextureGL::MarkNewFrameAvailable() {} } // namespace flutter diff --git a/shell/platform/embedder/embedder_external_texture_gl.h b/shell/platform/embedder/embedder_external_texture_gl.h index 3381bc6969b..e1cd383c72f 100644 --- a/shell/platform/embedder/embedder_external_texture_gl.h +++ b/shell/platform/embedder/embedder_external_texture_gl.h @@ -12,7 +12,7 @@ namespace flutter { -class EmbedderExternalTextureGL : public flow::Texture { +class EmbedderExternalTextureGL : public flutter::Texture { public: using ExternalTextureCallback = std::function< sk_sp(int64_t texture_identifier, GrContext*, const SkISize&)>; @@ -26,19 +26,19 @@ class EmbedderExternalTextureGL : public flow::Texture { ExternalTextureCallback external_texture_callback_; sk_sp last_image_; - // |flow::Texture| + // |flutter::Texture| void Paint(SkCanvas& canvas, const SkRect& bounds, bool freeze, GrContext* context) override; - // |flow::Texture| + // |flutter::Texture| void OnGrContextCreated() override; - // |flow::Texture| + // |flutter::Texture| void OnGrContextDestroyed() override; - // |flow::Texture| + // |flutter::Texture| void MarkNewFrameAvailable() override; FML_DISALLOW_COPY_AND_ASSIGN(EmbedderExternalTextureGL);