[flutter_runner] Rename flow namespace to flutter
See: https://github.com/flutter/engine/commit/8ff631f3dfb5ef8c0893113ea2860dce268ecb89
Change-Id: Iaa04657e49c4defae023b0383cd549daf8f28f46
diff --git a/runtime/flutter_runner/compositor_context.cc b/runtime/flutter_runner/compositor_context.cc
index 89b4f1e..7748746 100644
--- a/runtime/flutter_runner/compositor_context.cc
+++ b/runtime/flutter_runner/compositor_context.cc
@@ -8,13 +8,13 @@
namespace flutter_runner {
-class ScopedFrame final : public flow::CompositorContext::ScopedFrame {
+class ScopedFrame final : public flutter::CompositorContext::ScopedFrame {
public:
- ScopedFrame(flow::CompositorContext& context,
+ ScopedFrame(flutter::CompositorContext& context,
const SkMatrix& root_surface_transformation,
bool instrumentation_enabled,
SessionConnection& session_connection)
- : flow::CompositorContext::ScopedFrame(context, nullptr, nullptr, nullptr,
+ : flutter::CompositorContext::ScopedFrame(context, nullptr, nullptr, nullptr,
root_surface_transformation,
instrumentation_enabled),
session_connection_(session_connection) {}
@@ -22,7 +22,7 @@
private:
SessionConnection& session_connection_;
- bool Raster(flow::LayerTree& layer_tree, bool ignore_raster_cache) override {
+ bool Raster(flutter::LayerTree& layer_tree, bool ignore_raster_cache) override {
if (!session_connection_.has_metrics()) {
return true;
}
@@ -76,9 +76,9 @@
CompositorContext::~CompositorContext() = default;
-std::unique_ptr<flow::CompositorContext::ScopedFrame>
+std::unique_ptr<flutter::CompositorContext::ScopedFrame>
CompositorContext::AcquireFrame(GrContext* gr_context, SkCanvas* canvas,
- flow::ExternalViewEmbedder* view_embedder,
+ flutter::ExternalViewEmbedder* view_embedder,
const SkMatrix& root_surface_transformation,
bool instrumentation_enabled) {
// TODO: The AcquireFrame interface is too broad and must be refactored to get
diff --git a/runtime/flutter_runner/compositor_context.h b/runtime/flutter_runner/compositor_context.h
index 61976d2..34cd77d 100644
--- a/runtime/flutter_runner/compositor_context.h
+++ b/runtime/flutter_runner/compositor_context.h
@@ -18,7 +18,7 @@
// Holds composition specific state and bindings specific to composition on
// Fuchsia.
-class CompositorContext final : public flow::CompositorContext {
+class CompositorContext final : public flutter::CompositorContext {
public:
CompositorContext(std::string debug_label,
fuchsia::ui::views::ViewToken view_token,
@@ -36,10 +36,10 @@
const std::string debug_label_;
SessionConnection session_connection_;
- // |flow::CompositorContext|
+ // |flutter::CompositorContext|
std::unique_ptr<ScopedFrame> AcquireFrame(
GrContext* gr_context, SkCanvas* canvas,
- flow::ExternalViewEmbedder* view_embedder,
+ flutter::ExternalViewEmbedder* view_embedder,
const SkMatrix& root_surface_transformation,
bool instrumentation_enabled) override;
diff --git a/runtime/flutter_runner/engine.cc b/runtime/flutter_runner/engine.cc
index 75124d3..b7a27a3 100644
--- a/runtime/flutter_runner/engine.cc
+++ b/runtime/flutter_runner/engine.cc
@@ -156,7 +156,7 @@
// Create the compositor context from the scenic pointer to create the
// rasterizer.
- std::unique_ptr<flow::CompositorContext> compositor_context;
+ std::unique_ptr<flutter::CompositorContext> compositor_context;
{
TRACE_DURATION("flutter", "CreateCompositorContext");
compositor_context = std::make_unique<flutter_runner::CompositorContext>(
diff --git a/runtime/flutter_runner/session_connection.cc b/runtime/flutter_runner/session_connection.cc
index 4ea01e1..90d2aa5 100644
--- a/runtime/flutter_runner/session_connection.cc
+++ b/runtime/flutter_runner/session_connection.cc
@@ -47,7 +47,7 @@
SessionConnection::~SessionConnection() = default;
-void SessionConnection::Present(flow::CompositorContext::ScopedFrame& frame) {
+void SessionConnection::Present(flutter::CompositorContext::ScopedFrame& frame) {
// Flush all session ops. Paint tasks have not yet executed but those are
// fenced. The compositor can start processing ops while we finalize paint
// tasks.
diff --git a/runtime/flutter_runner/session_connection.h b/runtime/flutter_runner/session_connection.h
index e9b6bc9..2b9e8da 100644
--- a/runtime/flutter_runner/session_connection.h
+++ b/runtime/flutter_runner/session_connection.h
@@ -47,14 +47,14 @@
fidl::MakeOptional(std::move(metrics_copy)));
}
- flow::SceneUpdateContext& scene_update_context() {
+ flutter::SceneUpdateContext& scene_update_context() {
return scene_update_context_;
}
scenic::ContainerNode& root_node() { return root_node_; }
scenic::View* root_view() { return &root_view_; }
- void Present(flow::CompositorContext::ScopedFrame& frame);
+ void Present(flutter::CompositorContext::ScopedFrame& frame);
void OnSessionSizeChangeHint(float width_change_factor,
float height_change_factor);
@@ -67,7 +67,7 @@
scenic::EntityNode root_node_;
std::unique_ptr<VulkanSurfaceProducer> surface_producer_;
- flow::SceneUpdateContext scene_update_context_;
+ flutter::SceneUpdateContext scene_update_context_;
zx_handle_t vsync_event_handle_;
// A flow event trace id for following |Session::Present| calls into
diff --git a/runtime/flutter_runner/vulkan_surface.h b/runtime/flutter_runner/vulkan_surface.h
index b7059cd..f79091c 100644
--- a/runtime/flutter_runner/vulkan_surface.h
+++ b/runtime/flutter_runner/vulkan_surface.h
@@ -43,7 +43,7 @@
const SkISize& size, VulkanImage* out_vulkan_image);
class VulkanSurface final
- : public flow::SceneUpdateContext::SurfaceProducerSurface {
+ : public flutter::SceneUpdateContext::SurfaceProducerSurface {
public:
VulkanSurface(vulkan::VulkanProvider& vulkan_provider,
sk_sp<GrContext> context, scenic::Session* session,
@@ -51,16 +51,16 @@
~VulkanSurface() override;
- // |flow::SceneUpdateContext::SurfaceProducerSurface|
+ // |flutter::SceneUpdateContext::SurfaceProducerSurface|
size_t AdvanceAndGetAge() override;
- // |flow::SceneUpdateContext::SurfaceProducerSurface|
+ // |flutter::SceneUpdateContext::SurfaceProducerSurface|
bool FlushSessionAcquireAndReleaseEvents() override;
- // |flow::SceneUpdateContext::SurfaceProducerSurface|
+ // |flutter::SceneUpdateContext::SurfaceProducerSurface|
bool IsValid() const override;
- // |flow::SceneUpdateContext::SurfaceProducerSurface|
+ // |flutter::SceneUpdateContext::SurfaceProducerSurface|
SkISize GetSize() const override;
// Note: It is safe for the caller to collect the surface in the
@@ -68,10 +68,10 @@
void SignalWritesFinished(
std::function<void(void)> on_writes_committed) override;
- // |flow::SceneUpdateContext::SurfaceProducerSurface|
+ // |flutter::SceneUpdateContext::SurfaceProducerSurface|
scenic::Image* GetImage() override;
- // |flow::SceneUpdateContext::SurfaceProducerSurface|
+ // |flutter::SceneUpdateContext::SurfaceProducerSurface|
sk_sp<SkSurface> GetSkiaSurface() const override;
const vulkan::VulkanHandle<VkImage>& GetVkImage() {
@@ -116,14 +116,14 @@
// if the swap was not successful.
bool BindToImage(sk_sp<GrContext> context, VulkanImage vulkan_image);
- // Flutter may retain a |VulkanSurface| for a |flow::Layer| subtree to improve
+ // Flutter may retain a |VulkanSurface| for a |flutter::Layer| subtree to improve
// the performance. The |retained_key_| identifies which layer subtree this
// |VulkanSurface| is retained for. The key has two parts. One is the pointer
// to the root of that layer subtree: |retained_key_.id()|. Another is the
// transformation matrix: |retained_key_.matrix()|. We need the matrix part
// because a different matrix would invalidate the pixels (raster cache) in
// this |VulkanSurface|.
- const flow::LayerRasterCacheKey& GetRetainedKey() const {
+ const flutter::LayerRasterCacheKey& GetRetainedKey() const {
return retained_key_;
}
@@ -144,7 +144,7 @@
// Let this surface own the retained EntityNode associated with it (see
// |GetRetainedNode|), and set the retained key (see |GetRetainedKey|).
- void SetRetainedInfo(const flow::LayerRasterCacheKey& key,
+ void SetRetainedInfo(const flutter::LayerRasterCacheKey& key,
std::unique_ptr<scenic::EntityNode> node) {
retained_key_ = key;
retained_node_ = std::move(node);
@@ -194,7 +194,7 @@
size_t age_ = 0;
bool valid_ = false;
- flow::LayerRasterCacheKey retained_key_ =
+ flutter::LayerRasterCacheKey retained_key_ =
{nullptr, SkMatrix::MakeScale(1, 1)};
std::unique_ptr<scenic::EntityNode> retained_node_ = nullptr;
diff --git a/runtime/flutter_runner/vulkan_surface_pool.cc b/runtime/flutter_runner/vulkan_surface_pool.cc
index 5fcdcb7..4bb076f 100644
--- a/runtime/flutter_runner/vulkan_surface_pool.cc
+++ b/runtime/flutter_runner/vulkan_surface_pool.cc
@@ -107,7 +107,7 @@
}
void VulkanSurfacePool::SubmitSurface(
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>
p_surface) {
TRACE_DURATION("flutter", "VulkanSurfacePool::SubmitSurface");
@@ -122,7 +122,7 @@
}
- const flow::LayerRasterCacheKey& retained_key =
+ const flutter::LayerRasterCacheKey& retained_key =
vulkan_surface->GetRetainedKey();
if (retained_key.id() != nullptr) {
// Add the surface to |retained_surfaces_| if its retained key has a non-
@@ -204,7 +204,7 @@
}
void VulkanSurfacePool::RecycleRetainedSurface(
- const flow::LayerRasterCacheKey& key) {
+ const flutter::LayerRasterCacheKey& key) {
auto it = retained_surfaces_.find(key);
if (it == retained_surfaces_.end()) {
return;
@@ -218,7 +218,7 @@
RecycleSurface(std::move(surface_to_recycle));
}
-void VulkanSurfacePool::SignalRetainedReady(flow::LayerRasterCacheKey key) {
+void VulkanSurfacePool::SignalRetainedReady(flutter::LayerRasterCacheKey key) {
retained_surfaces_[key].is_pending = false;
}
@@ -259,7 +259,7 @@
// It's safe to recycle any retained surfaces that are not pending no matter
// whether they're used or not. Hence if there's memory pressure, feel free to
// recycle all retained surfaces that are not pending.
- std::vector<flow::LayerRasterCacheKey> recycle_keys;
+ std::vector<flutter::LayerRasterCacheKey> recycle_keys;
for (auto&[key, retained_surface] : retained_surfaces_) {
if (retained_surface.is_pending ||
retained_surface.vk_surface->IsUsedInRetainedRendering()) {
diff --git a/runtime/flutter_runner/vulkan_surface_pool.h b/runtime/flutter_runner/vulkan_surface_pool.h
index 7bb026c..67ce4d5 100644
--- a/runtime/flutter_runner/vulkan_surface_pool.h
+++ b/runtime/flutter_runner/vulkan_surface_pool.h
@@ -28,7 +28,7 @@
std::unique_ptr<VulkanSurface> AcquireSurface(const SkISize& size);
void SubmitSurface(
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>
surface);
void AgeAndCollectOldBuffers();
@@ -38,12 +38,12 @@
void ShrinkToFit();
// For |VulkanSurfaceProducer::HasRetainedNode|.
- bool HasRetainedNode(const flow::LayerRasterCacheKey& key) const {
+ bool HasRetainedNode(const flutter::LayerRasterCacheKey& key) const {
return retained_surfaces_.find(key) != retained_surfaces_.end();
}
// For |VulkanSurfaceProducer::GetRetainedNode|.
const scenic::EntityNode& GetRetainedNode(
- const flow::LayerRasterCacheKey& key) {
+ const flutter::LayerRasterCacheKey& key) {
FML_DCHECK(HasRetainedNode(key));
return retained_surfaces_[key].vk_surface->GetRetainedNode();
}
@@ -67,7 +67,7 @@
pending_surfaces_;
// Retained surfaces keyed by the layer that created and used the surface.
- flow::LayerRasterCacheKey::Map<RetainedSurface>
+ flutter::LayerRasterCacheKey::Map<RetainedSurface>
retained_surfaces_;
size_t trace_surfaces_created_ = 0;
@@ -82,11 +82,11 @@
void RecyclePendingSurface(uintptr_t surface_key);
// Clear the |is_pending| flag of the retained surface.
- void SignalRetainedReady(flow::LayerRasterCacheKey key);
+ void SignalRetainedReady(flutter::LayerRasterCacheKey key);
// Remove the corresponding surface from |retained_surfaces| and recycle it.
// The surface must not be pending.
- void RecycleRetainedSurface(const flow::LayerRasterCacheKey& key);
+ void RecycleRetainedSurface(const flutter::LayerRasterCacheKey& key);
void TraceStats();
diff --git a/runtime/flutter_runner/vulkan_surface_producer.cc b/runtime/flutter_runner/vulkan_surface_producer.cc
index 002228f..e8876ca 100644
--- a/runtime/flutter_runner/vulkan_surface_producer.cc
+++ b/runtime/flutter_runner/vulkan_surface_producer.cc
@@ -127,7 +127,7 @@
void VulkanSurfaceProducer::OnSurfacesPresented(
std::vector<
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>>
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>>
surfaces) {
TRACE_DURATION("flutter", "VulkanSurfaceProducer::OnSurfacesPresented");
@@ -167,7 +167,7 @@
bool VulkanSurfaceProducer::TransitionSurfacesToExternal(
const std::vector<
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>>&
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>>&
surfaces) {
for (auto& surface : surfaces) {
auto vk_surface = static_cast<VulkanSurface*>(surface.get());
@@ -222,10 +222,10 @@
return true;
}
-std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>
+std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>
VulkanSurfaceProducer::ProduceSurface(
const SkISize& size,
- const flow::LayerRasterCacheKey& layer_key,
+ const flutter::LayerRasterCacheKey& layer_key,
std::unique_ptr<scenic::EntityNode> entity_node) {
FML_DCHECK(valid_);
last_produce_time_ = async::Now(async_get_default_dispatcher());
@@ -235,7 +235,7 @@
}
void VulkanSurfaceProducer::SubmitSurface(
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface> surface) {
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface> surface) {
FML_DCHECK(valid_ && surface != nullptr);
surface_pool_->SubmitSurface(std::move(surface));
}
diff --git a/runtime/flutter_runner/vulkan_surface_producer.h b/runtime/flutter_runner/vulkan_surface_producer.h
index 9621a36..a6e0cd3 100644
--- a/runtime/flutter_runner/vulkan_surface_producer.h
+++ b/runtime/flutter_runner/vulkan_surface_producer.h
@@ -24,7 +24,7 @@
namespace flutter_runner {
class VulkanSurfaceProducer final
- : public flow::SceneUpdateContext::SurfaceProducer,
+ : public flutter::SceneUpdateContext::SurfaceProducer,
public vulkan::VulkanProvider {
public:
VulkanSurfaceProducer(scenic::Session* scenic_session);
@@ -33,31 +33,31 @@
bool IsValid() const { return valid_; }
- // |flow::SceneUpdateContext::SurfaceProducer|
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>
+ // |flutter::SceneUpdateContext::SurfaceProducer|
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>
ProduceSurface(const SkISize& size,
- const flow::LayerRasterCacheKey& layer_key,
+ const flutter::LayerRasterCacheKey& layer_key,
std::unique_ptr<scenic::EntityNode> entity_node) override;
- // |flow::SceneUpdateContext::SurfaceProducer|
+ // |flutter::SceneUpdateContext::SurfaceProducer|
void SubmitSurface(
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface> surface)
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface> surface)
override;
- // |flow::SceneUpdateContext::HasRetainedNode|
- bool HasRetainedNode(const flow::LayerRasterCacheKey& key) const override {
+ // |flutter::SceneUpdateContext::HasRetainedNode|
+ bool HasRetainedNode(const flutter::LayerRasterCacheKey& key) const override {
return surface_pool_->HasRetainedNode(key);
}
- // |flow::SceneUpdateContext::GetRetainedNode|
+ // |flutter::SceneUpdateContext::GetRetainedNode|
const scenic::EntityNode& GetRetainedNode(
- const flow::LayerRasterCacheKey& key) override {
+ const flutter::LayerRasterCacheKey& key) override {
return surface_pool_->GetRetainedNode(key);
}
void OnSurfacesPresented(
std::vector<
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>>
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>>
surfaces);
void OnSessionSizeChangeHint(float width_change_factor,
@@ -76,7 +76,7 @@
bool TransitionSurfacesToExternal(
const std::vector<
- std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>>&
+ std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>>&
surfaces);
// Note: the order here is very important. The proctable must be destroyed