5#ifndef FLUTTER_FLOW_LAYERS_LAYER_TREE_H_
6#define FLUTTER_FLOW_LAYERS_LAYER_TREE_H_
11#include "flutter/common/graphics/texture.h"
12#include "flutter/flow/compositor_context.h"
13#include "flutter/flow/layers/layer.h"
14#include "flutter/flow/raster_cache.h"
15#include "flutter/fml/macros.h"
16#include "flutter/fml/time/time_delta.h"
35 bool ignore_raster_cache =
false,
40 const std::vector<RasterCacheItem*>& raster_cached_entries,
42 bool ignore_raster_cache =
false);
46 bool ignore_raster_cache =
false)
const;
50 const std::shared_ptr<TextureRegistry>& texture_registry =
nullptr,
66 enable_leaf_layer_tracing_ = enable;
70 return enable_leaf_layer_tracing_;
74 std::shared_ptr<Layer> root_layer_;
76 bool enable_leaf_layer_tracing_ =
false;
80 std::vector<RasterCacheItem*> raster_cache_items_;
Layer * root_layer() const
bool Preroll(CompositorContext::ScopedFrame &frame, bool ignore_raster_cache=false, SkRect cull_rect=kGiantRect)
LayerTree(const std::shared_ptr< Layer > &root_layer, const SkISize &frame_size)
const SkISize & frame_size() const
void enable_leaf_layer_tracing(bool enable)
void Paint(CompositorContext::ScopedFrame &frame, bool ignore_raster_cache=false) const
const PaintRegionMap & paint_region_map() const
bool is_leaf_layer_tracing_enabled() const
sk_sp< DisplayList > Flatten(const SkRect &bounds, const std::shared_ptr< TextureRegistry > &texture_registry=nullptr, GrDirectContext *gr_context=nullptr)
static void TryToRasterCache(const std::vector< RasterCacheItem * > &raster_cached_entries, const PaintContext *paint_context, bool ignore_raster_cache=false)
PaintRegionMap & paint_region_map()
Optional< SkRect > bounds
std::map< uint64_t, PaintRegion > PaintRegionMap
static constexpr SkRect kGiantRect
static constexpr SkISize MakeEmpty()
std::unique_ptr< LayerTree > layer_tree
The target layer tree to be drawn.
int64_t view_id
The target view to draw to.
float device_pixel_ratio
The pixel ratio of the target view.
LayerTreeTask(int64_t view_id, std::unique_ptr< LayerTree > layer_tree, float device_pixel_ratio)