5#ifndef FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_VIEW_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_EXTERNAL_VIEW_H_
9#include <unordered_map>
10#include <unordered_set>
12#include "flutter/flow/embedded_views.h"
13#include "flutter/fml/hash_combine.h"
14#include "flutter/fml/macros.h"
15#include "flutter/shell/platform/embedder/embedder_render_target.h"
32 if (!
desc.platform_view_id.has_value()) {
58 desc.surface_size.height());
75 std::unique_ptr<EmbedderExternalView>,
80 const SkMatrix& surface_transformation);
83 const SkMatrix& surface_transformation,
85 std::unique_ptr<EmbeddedViewParams>
params);
106 bool clear_surface =
true);
113 void TryEndRecording()
const;
115 const SkISize render_surface_size_;
116 const SkMatrix surface_transformation_;
118 std::unique_ptr<EmbeddedViewParams> embedded_view_params_;
119 std::unique_ptr<DisplayListEmbedderViewSlice> slice_;
120 std::optional<bool> has_engine_rendered_contents_;
Developer-facing API for rendering anything within the engine.
const EmbeddedViewParams * GetEmbeddedViewParams() const
RenderTargetDescriptor CreateRenderTargetDescriptor() const
SkISize GetRenderSurfaceSize() const
bool Render(const EmbedderRenderTarget &render_target, bool clear_surface=true)
std::unordered_set< ViewIdentifier, ViewIdentifier::Hash, ViewIdentifier::Equal > ViewIdentifierSet
const DlRegion & GetDlRegion() const
bool HasPlatformView() const
ViewIdentifier GetViewIdentifier() const
bool HasEngineRenderedContents()
EmbedderExternalView(const SkISize &frame_size, const SkMatrix &surface_transformation)
std::unordered_map< ViewIdentifier, std::unique_ptr< EmbedderExternalView >, ViewIdentifier::Hash, ViewIdentifier::Equal > PendingViews
Describes a surface whose backing store is managed by the embedder. The type of surface depends on th...
EmbedderExternalView::ViewIdentifier view_identifier
const EmbeddedViewParams * params
static uint32_t Hash(uint32_t key)
constexpr std::size_t HashCombine()
bool operator()(const RenderTargetDescriptor &lhs, const RenderTargetDescriptor &rhs) const
constexpr std::size_t operator()(const RenderTargetDescriptor &desc) const
RenderTargetDescriptor(const SkISize &p_surface_size)
constexpr bool operator()(const ViewIdentifier &lhs, const ViewIdentifier &rhs) const
constexpr std::size_t operator()(const ViewIdentifier &desc) const
ViewIdentifier(PlatformViewID view_id)
std::optional< PlatformViewID > platform_view_id