5#include "flutter/shell/common/snapshot_controller_impeller.h"
9#include "flutter/flow/surface.h"
10#include "flutter/fml/trace_event.h"
11#include "flutter/impeller/display_list/dl_dispatcher.h"
12#include "flutter/impeller/display_list/dl_image_impeller.h"
13#include "flutter/impeller/geometry/size.h"
14#include "flutter/shell/common/snapshot_controller.h"
28 [&] {
result = DoMakeRasterSnapshot(display_list,
size); }));
38 display_list->Dispatch(dispatcher);
42 auto max_size = context->GetContext()
43 ->GetResourceAllocator()
44 ->GetMaxTextureSizeSupported();
45 double scale_factor_x =
46 static_cast<double>(max_size.width) /
static_cast<double>(
size.width());
47 double scale_factor_y =
static_cast<double>(max_size.height) /
48 static_cast<double>(
size.height());
50 std::min(1.0, std::min(scale_factor_x, scale_factor_y));
57 if (scale_factor < 1.0) {
58 render_target_size.width *= scale_factor;
59 render_target_size.height *= scale_factor;
62 std::shared_ptr<impeller::Image>
image =
63 picture.ToImage(*context, render_target_size);
74 const std::shared_ptr<impeller::RuntimeStage>& runtime_stage) {
sk_sp< DlImage > MakeRasterSnapshot(sk_sp< DisplayList > display_list, SkISize size) override
sk_sp< SkImage > ConvertToRasterImage(sk_sp< SkImage > image) override
void CacheRuntimeStage(const std::shared_ptr< impeller::RuntimeStage > &runtime_stage) override
virtual std::shared_ptr< const fml::SyncSwitch > GetIsGpuDisabledSyncSwitch() const =0
virtual std::shared_ptr< impeller::AiksContext > GetAiksContext() const =0
const Delegate & GetDelegate()
Picture EndRecordingAsPicture()
static sk_sp< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
bool BootstrapShader(const ContentContext &renderer) const
Load the runtime effect and ensure a default PSO is initialized.
void SetRuntimeStage(std::shared_ptr< RuntimeStage > runtime_stage)
#define FML_UNREACHABLE()
it will be possible to load the file into Perfetto s trace viewer 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
Represents the 2 code paths available when calling |SyncSwitchExecute|.
#define TRACE_EVENT0(category_group, name)