Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
flutter::CompositorContext Class Reference

#include <compositor_context.h>

Classes

class  ScopedFrame
 

Public Member Functions

 CompositorContext ()
 
 CompositorContext (Stopwatch::RefreshRateUpdater &updater)
 
virtual ~CompositorContext ()
 
virtual std::unique_ptr< ScopedFrameAcquireFrame (GrDirectContext *gr_context, DlCanvas *canvas, ExternalViewEmbedder *view_embedder, const SkMatrix &root_surface_transformation, bool instrumentation_enabled, bool surface_supports_readback, fml::RefPtr< fml::RasterThreadMerger > raster_thread_merger, impeller::AiksContext *aiks_context)
 
void OnGrContextCreated ()
 
void OnGrContextDestroyed ()
 
RasterCacheraster_cache ()
 
std::shared_ptr< TextureRegistrytexture_registry ()
 
const Stopwatchraster_time () const
 
Stopwatchui_time ()
 
LayerSnapshotStoresnapshot_store ()
 

Detailed Description

Definition at line 107 of file compositor_context.h.

Constructor & Destructor Documentation

◆ CompositorContext() [1/2]

flutter::CompositorContext::CompositorContext ( )

Definition at line 49 of file compositor_context.cc.

50 : texture_registry_(std::make_shared<TextureRegistry>()),
51 raster_time_(fixed_refresh_rate_updater_),
52 ui_time_(fixed_refresh_rate_updater_) {}

◆ CompositorContext() [2/2]

flutter::CompositorContext::CompositorContext ( Stopwatch::RefreshRateUpdater updater)
explicit

Definition at line 54 of file compositor_context.cc.

55 : texture_registry_(std::make_shared<TextureRegistry>()),
56 raster_time_(updater),
57 ui_time_(updater) {}

◆ ~CompositorContext()

flutter::CompositorContext::~CompositorContext ( )
virtualdefault

Member Function Documentation

◆ AcquireFrame()

std::unique_ptr< CompositorContext::ScopedFrame > flutter::CompositorContext::AcquireFrame ( GrDirectContext gr_context,
DlCanvas canvas,
ExternalViewEmbedder view_embedder,
const SkMatrix root_surface_transformation,
bool  instrumentation_enabled,
bool  surface_supports_readback,
fml::RefPtr< fml::RasterThreadMerger raster_thread_merger,
impeller::AiksContext aiks_context 
)
virtual

Definition at line 75 of file compositor_context.cc.

84 {
85 return std::make_unique<ScopedFrame>(
86 *this, gr_context, canvas, view_embedder, root_surface_transformation,
87 instrumentation_enabled, surface_supports_readback, raster_thread_merger,
88 aiks_context);
89}

◆ OnGrContextCreated()

void flutter::CompositorContext::OnGrContextCreated ( )

Definition at line 225 of file compositor_context.cc.

225 {
226 texture_registry_->OnGrContextCreated();
227#if !SLIMPELLER
228 raster_cache_.Clear();
229#endif // !SLIMPELLER
230}

◆ OnGrContextDestroyed()

void flutter::CompositorContext::OnGrContextDestroyed ( )

Definition at line 232 of file compositor_context.cc.

232 {
233 texture_registry_->OnGrContextDestroyed();
234#if !SLIMPELLER
235 raster_cache_.Clear();
236#endif // !SLIMPELLER
237}

◆ raster_cache()

RasterCache & flutter::CompositorContext::raster_cache ( )
inline

Definition at line 187 of file compositor_context.h.

187{ return raster_cache_; }

◆ raster_time()

const Stopwatch & flutter::CompositorContext::raster_time ( ) const
inline

Definition at line 194 of file compositor_context.h.

194{ return raster_time_; }

◆ snapshot_store()

LayerSnapshotStore & flutter::CompositorContext::snapshot_store ( )
inline

Definition at line 198 of file compositor_context.h.

198{ return layer_snapshot_store_; }

◆ texture_registry()

std::shared_ptr< TextureRegistry > flutter::CompositorContext::texture_registry ( )
inline

Definition at line 190 of file compositor_context.h.

190 {
191 return texture_registry_;
192 }

◆ ui_time()

Stopwatch & flutter::CompositorContext::ui_time ( )
inline

Definition at line 196 of file compositor_context.h.

196{ return ui_time_; }

The documentation for this class was generated from the following files: