Flutter Engine
flutter::CompositorContext Class Reference

#include <compositor_context.h>

Inheritance diagram for flutter::CompositorContext:
flutter_runner::CompositorContext

Classes

class  ScopedFrame
 

Public Member Functions

 CompositorContext (fml::Milliseconds frame_budget=fml::kDefaultFrameBudget)
 
virtual ~CompositorContext ()
 
virtual std::unique_ptr< ScopedFrameAcquireFrame (GrDirectContext *gr_context, SkCanvas *canvas, ExternalViewEmbedder *view_embedder, const SkMatrix &root_surface_transformation, bool instrumentation_enabled, bool surface_supports_readback, fml::RefPtr< fml::RasterThreadMerger > raster_thread_merger)
 
void OnGrContextCreated ()
 
void OnGrContextDestroyed ()
 
RasterCacheraster_cache ()
 
TextureRegistrytexture_registry ()
 
const Counterframe_count () const
 
const Stopwatchraster_time () const
 
Stopwatchui_time ()
 

Detailed Description

Definition at line 53 of file compositor_context.h.

Constructor & Destructor Documentation

◆ CompositorContext()

flutter::CompositorContext::CompositorContext ( fml::Milliseconds  frame_budget = fml::kDefaultFrameBudget)

Definition at line 12 of file compositor_context.cc.

References flutter::Counter::Increment(), flutter::Stopwatch::Start(), flutter::Stopwatch::Stop(), flutter::RasterCache::SweepAfterFrame(), and ~CompositorContext().

13  : raster_time_(frame_budget), ui_time_(frame_budget) {}

◆ ~CompositorContext()

flutter::CompositorContext::~CompositorContext ( )
virtualdefault

Reimplemented in flutter_runner::CompositorContext.

Referenced by CompositorContext().

Member Function Documentation

◆ AcquireFrame()

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

Definition at line 33 of file compositor_context.cc.

40  {
41  return std::make_unique<ScopedFrame>(
42  *this, gr_context, canvas, view_embedder, root_surface_transformation,
43  instrumentation_enabled, surface_supports_readback, raster_thread_merger);
44 }

◆ frame_count()

const Counter& flutter::CompositorContext::frame_count ( ) const
inline

Definition at line 119 of file compositor_context.h.

119 { return frame_count_; }

◆ OnGrContextCreated()

void flutter::CompositorContext::OnGrContextCreated ( )

Definition at line 107 of file compositor_context.cc.

107  {
108  texture_registry_.OnGrContextCreated();
109  raster_cache_.Clear();
110 }

◆ OnGrContextDestroyed()

void flutter::CompositorContext::OnGrContextDestroyed ( )

Definition at line 112 of file compositor_context.cc.

112  {
113  texture_registry_.OnGrContextDestroyed();
114  raster_cache_.Clear();
115 }

◆ raster_cache()

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

Definition at line 115 of file compositor_context.h.

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

115 { return raster_cache_; }

◆ raster_time()

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

Definition at line 121 of file compositor_context.h.

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

121 { return raster_time_; }

◆ texture_registry()

TextureRegistry& flutter::CompositorContext::texture_registry ( )
inline

Definition at line 117 of file compositor_context.h.

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

117 { return texture_registry_; }

◆ ui_time()

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

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