Flutter Engine
 
Loading...
Searching...
No Matches
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 DlMatrix &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 ()
 

Detailed Description

Definition at line 105 of file compositor_context.h.

Constructor & Destructor Documentation

◆ CompositorContext() [1/2]

flutter::CompositorContext::CompositorContext ( )

Definition at line 46 of file compositor_context.cc.

47 : texture_registry_(std::make_shared<TextureRegistry>()),
48 raster_time_(fixed_refresh_rate_updater_),
49 ui_time_(fixed_refresh_rate_updater_) {}

◆ CompositorContext() [2/2]

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

Definition at line 51 of file compositor_context.cc.

52 : texture_registry_(std::make_shared<TextureRegistry>()),
53 raster_time_(updater),
54 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 DlMatrix 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 72 of file compositor_context.cc.

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

Referenced by flutter::RenderFrameForScreenshot(), and flutter::ScreenshotLayerTreeAsPicture().

◆ OnGrContextCreated()

void flutter::CompositorContext::OnGrContextCreated ( )

Definition at line 227 of file compositor_context.cc.

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

◆ OnGrContextDestroyed()

void flutter::CompositorContext::OnGrContextDestroyed ( )

Definition at line 234 of file compositor_context.cc.

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

◆ raster_cache()

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

Definition at line 185 of file compositor_context.h.

185{ return raster_cache_; }

Referenced by flutter::LayerTree::Paint(), and flutter::LayerTree::Preroll().

◆ raster_time()

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

Definition at line 192 of file compositor_context.h.

192{ return raster_time_; }

Referenced by flutter::LayerTree::Paint(), and flutter::LayerTree::Preroll().

◆ texture_registry()

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

Definition at line 188 of file compositor_context.h.

188 {
189 return texture_registry_;
190 }

Referenced by flutter::LayerTree::Paint(), and flutter::LayerTree::Preroll().

◆ ui_time()

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

Definition at line 194 of file compositor_context.h.

194{ return ui_time_; }

Referenced by flutter::LayerTree::Paint(), and flutter::LayerTree::Preroll().


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