Port flutter content handler to FIDL2. (flutter/engine#4903)
This commit is contained in:
@@ -83,7 +83,7 @@ source_set("flow") {
|
||||
"scene_update_context.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
public_deps += [
|
||||
"//garnet/public/lib/ui/scenic:client",
|
||||
"//garnet/public/lib/ui/scenic/fidl",
|
||||
"//topaz/public/dart-pkg/zircon",
|
||||
|
||||
@@ -61,8 +61,8 @@ void ExportNode::Bind(SceneUpdateContext& context,
|
||||
container.AddChild(*node_);
|
||||
node_->SetTranslation(offset.x(), offset.y(), 0.f);
|
||||
node_->SetHitTestBehavior(hit_testable
|
||||
? ui::gfx::HitTestBehavior::kDefault
|
||||
: ui::gfx::HitTestBehavior::kSuppress);
|
||||
? gfx::HitTestBehavior::kDefault
|
||||
: gfx::HitTestBehavior::kSuppress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class Layer {
|
||||
|
||||
struct PrerollContext {
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics = nullptr;
|
||||
gfx::Metrics* metrics = nullptr;
|
||||
#endif
|
||||
RasterCache* raster_cache;
|
||||
GrContext* gr_context;
|
||||
|
||||
@@ -19,7 +19,7 @@ LayerTree::~LayerTree() = default;
|
||||
|
||||
void LayerTree::Raster(CompositorContext::ScopedFrame& frame,
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics,
|
||||
gfx::Metrics* metrics,
|
||||
#endif
|
||||
bool ignore_raster_cache) {
|
||||
#if defined(OS_FUCHSIA)
|
||||
@@ -35,7 +35,7 @@ void LayerTree::Raster(CompositorContext::ScopedFrame& frame,
|
||||
|
||||
void LayerTree::Preroll(CompositorContext::ScopedFrame& frame,
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics,
|
||||
gfx::Metrics* metrics,
|
||||
#endif
|
||||
bool ignore_raster_cache) {
|
||||
#if defined(OS_FUCHSIA)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "lib/fxl/macros.h"
|
||||
#include "lib/fxl/time/time_delta.h"
|
||||
#if defined(OS_FUCHSIA)
|
||||
#include "lib/ui/scenic/fidl/events.fidl.h"
|
||||
#include <fuchsia/cpp/ui.h>
|
||||
#endif
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
@@ -29,13 +29,13 @@ class LayerTree {
|
||||
// Raster includes both Preroll and Paint.
|
||||
void Raster(CompositorContext::ScopedFrame& frame,
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics,
|
||||
gfx::Metrics* metrics,
|
||||
#endif
|
||||
bool ignore_raster_cache = false);
|
||||
|
||||
void Preroll(CompositorContext::ScopedFrame& frame,
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics,
|
||||
gfx::Metrics* metrics,
|
||||
#endif
|
||||
bool ignore_raster_cache = false);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ RasterCacheResult RasterizePicture(SkPicture* picture,
|
||||
const MatrixDecomposition& matrix,
|
||||
SkColorSpace* dst_color_space,
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics,
|
||||
gfx::Metrics* metrics,
|
||||
#endif
|
||||
bool checkerboard) {
|
||||
TRACE_EVENT0("flutter", "RasterCachePopulate");
|
||||
@@ -154,7 +154,7 @@ RasterCacheResult RasterCache::GetPrerolledImage(
|
||||
const SkMatrix& transformation_matrix,
|
||||
SkColorSpace* dst_color_space,
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics,
|
||||
gfx::Metrics* metrics,
|
||||
#endif
|
||||
bool is_complex,
|
||||
bool will_change) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "lib/fxl/macros.h"
|
||||
#include "lib/fxl/memory/weak_ptr.h"
|
||||
#if defined(OS_FUCHSIA)
|
||||
#include "lib/ui/scenic/fidl/events.fidl.h"
|
||||
#include <fuchsia/cpp/ui.h>
|
||||
#endif
|
||||
#include "third_party/skia/include/core/SkImage.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
@@ -58,7 +58,7 @@ class RasterCache {
|
||||
const SkMatrix& transformation_matrix,
|
||||
SkColorSpace* dst_color_space,
|
||||
#if defined(OS_FUCHSIA)
|
||||
ui::gfx::Metrics* metrics,
|
||||
gfx::Metrics* metrics,
|
||||
#endif
|
||||
bool is_complex,
|
||||
bool will_change);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define FLUTTER_FLOW_SCENE_UPDATE_CONTEXT_H_
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "flutter/flow/compositor_context.h"
|
||||
@@ -118,10 +119,10 @@ class SceneUpdateContext {
|
||||
scenic_lib::Session* session() { return session_; }
|
||||
|
||||
bool has_metrics() const { return !!metrics_; }
|
||||
void set_metrics(ui::gfx::MetricsPtr metrics) {
|
||||
void set_metrics(gfx::MetricsPtr metrics) {
|
||||
metrics_ = std::move(metrics);
|
||||
}
|
||||
const ui::gfx::MetricsPtr& metrics() const { return metrics_; }
|
||||
const gfx::MetricsPtr& metrics() const { return metrics_; }
|
||||
|
||||
void AddChildScene(ExportNode* export_node,
|
||||
SkPoint offset,
|
||||
@@ -181,7 +182,7 @@ class SceneUpdateContext {
|
||||
scenic_lib::Session* const session_;
|
||||
SurfaceProducer* const surface_producer_;
|
||||
|
||||
ui::gfx::MetricsPtr metrics_;
|
||||
gfx::MetricsPtr metrics_;
|
||||
|
||||
std::vector<PaintTask> paint_tasks_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user