mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
* Scenic is used on the GPU thread and is owned by the session connection held by the rasterizer. * The view container is used to initialize the mozart bindings on the UI thread. * Accessibility bridge is used on the platform thread.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// Copyright 2018 The Fuchsia Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#pragma once
|
|
|
|
#include <fuchsia/cpp/ui.h>
|
|
|
|
#include "flutter/flow/compositor_context.h"
|
|
#include "lib/fxl/macros.h"
|
|
#include "session_connection.h"
|
|
|
|
namespace flutter {
|
|
|
|
// Holds composition specific state and bindings specific to composition on
|
|
// Fuchsia.
|
|
class CompositorContext final : public flow::CompositorContext {
|
|
public:
|
|
CompositorContext(fidl::InterfaceHandle<ui::Scenic> scenic,
|
|
std::string debug_label,
|
|
zx::eventpair import_token,
|
|
OnMetricsUpdate session_metrics_did_change_callback,
|
|
fxl::Closure session_error_callback);
|
|
|
|
~CompositorContext() override;
|
|
|
|
private:
|
|
const std::string debug_label_;
|
|
SessionConnection session_connection_;
|
|
|
|
// |flow::CompositorContext|
|
|
std::unique_ptr<ScopedFrame> AcquireFrame(
|
|
GrContext* gr_context,
|
|
SkCanvas* canvas,
|
|
bool instrumentation_enabled) override;
|
|
|
|
FXL_DISALLOW_COPY_AND_ASSIGN(CompositorContext);
|
|
};
|
|
|
|
} // namespace flutter
|