10#include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
11#include "third_party/skia/include/gpu/ganesh/GrRecordingContext.h"
18 const auto transformed_rect =
19 source_rect.TransformAndClipBounds(transformation);
25 const DlMatrix& surface_transformation)
30 const DlMatrix& surface_transformation,
32 std::unique_ptr<EmbeddedViewParams>
params)
33 : render_surface_size_(
35 surface_transformation_(surface_transformation),
39 DlRect::MakeSize(frame_size))) {}
49 return slice_->canvas();
53 return render_surface_size_;
65 return slice_->getRegion();
69 if (has_engine_rendered_contents_.has_value()) {
70 return has_engine_rendered_contents_.value();
74 slice_->dispatch(dl_op_spy);
75 has_engine_rendered_contents_ = dl_op_spy.
did_draw() && !slice_->is_empty();
77 return has_engine_rendered_contents_.value();
82 return view_identifier_;
86 return embedded_view_params_.get();
93 <<
"Unnecessarily asked to render into a render target when there was "
101 slice_->render_into(&dl_canvas);
105void EmbedderExternalView::TryEndRecording()
const {
106 if (slice_->recording_ended()) {
109 slice_->end_recording();
Developer-facing API for rendering anything within the engine.
virtual int GetSaveCount() const =0
virtual void SetTransform(const DlMatrix &matrix)=0
virtual void RestoreToCount(int restore_count)=0
void Clear(DlColor color)
bool did_draw()
Returns true if any non transparent content has been drawn.
const EmbeddedViewParams * GetEmbeddedViewParams() const
void Render(DlCanvas &dl_canvas, bool clear_surface)
RenderTargetDescriptor CreateRenderTargetDescriptor() const
EmbedderExternalView(const DlISize &frame_size, const DlMatrix &surface_transformation)
const DlRegion & GetDlRegion() const
bool HasPlatformView() const
ViewIdentifier GetViewIdentifier() const
DlISize GetRenderSurfaceSize() const
bool HasEngineRenderedContents()
EmbedderExternalView::ViewIdentifier view_identifier
const EmbeddedViewParams * params
#define FML_DCHECK(condition)
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static DlISize TransformedSurfaceSize(const DlISize &size, const DlMatrix &transformation)
static constexpr DlColor kTransparent()
std::optional< PlatformViewID > platform_view_id
A 4x4 matrix using column-major storage.
RoundOut(const TRect< U > &r)
static constexpr TRect MakeSize(const TSize< U > &size)
#define TRACE_EVENT0(category_group, name)