5#ifndef FLUTTER_FLOW_DIFF_CONTEXT_H_
6#define FLUTTER_FLOW_DIFF_CONTEXT_H_
13#include "flutter/flow/paint_region.h"
14#include "flutter/fml/macros.h"
147 int horizontal_clip_alignment = 0,
148 int vertical_clip_alignment = 0)
const;
189 ++different_instance_but_equal_pictures_;
196 int new_pictures_ = 0;
197 int pictures_too_complex_to_compare_ = 0;
198 int same_instance_pictures_ = 0;
199 int deep_compare_pictures_ = 0;
200 int different_instance_but_equal_pictures_ = 0;
213 size_t rect_index = 0;
224 bool integral_transform =
false;
231 bool has_filter_bounds_adjustment =
false;
234 bool has_texture =
false;
237 void MakeTransformIntegral(DisplayListMatrixClipState& matrix_clip);
239 std::shared_ptr<std::vector<SkRect>> rects_;
242 std::vector<State> state_stack_;
243 std::vector<FilterBoundsAdjustment> filter_bounds_adjustment_stack_;
253 bool has_raster_cache_;
254 bool impeller_enabled_;
259 int horizontal_alignment,
260 int vertical_clip_alignment)
const;
274 std::vector<Readback> readbacks_;
275 Statistics statistics_;
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
AutoSubtreeRestore(DiffContext *context)
void AddSameInstancePicture()
void AddPictureTooComplexToCompare()
void AddDifferentInstanceButEqualPicture()
void AddDeepComparePicture()
SkMatrix GetTransform3x3() const
void PushTransform(const SkMatrix &transform)
void WillPaintWithIntegralTransform()
bool impeller_enabled() const
void AddLayerBounds(const SkRect &rect)
void SetLayerPaintRegion(const Layer *layer, const PaintRegion ®ion)
void MarkSubtreeDirty(const PaintRegion &previous_paint_region=PaintRegion())
Statistics & statistics()
void AddDamage(const PaintRegion &damage)
PaintRegion CurrentSubtreeRegion() const
void AddExistingPaintRegion(const PaintRegion ®ion)
void PushFilterBoundsAdjustment(const FilterBoundsAdjustment &filter)
bool has_raster_cache() const
PaintRegion GetOldLayerPaintRegion(const Layer *layer) const
SkRect MapRect(const SkRect &rect)
bool PushCullRect(const SkRect &clip)
Damage ComputeDamage(const SkIRect &additional_damage, int horizontal_clip_alignment=0, int vertical_clip_alignment=0) const
void MarkSubtreeHasTextureLayer()
bool IsSubtreeDirty() const
void AddReadbackRegion(const SkIRect &paint_rect, const SkIRect &readback_rect)
std::function< SkRect(SkRect)> FilterBoundsAdjustment
DiffContext(SkISize frame_size, PaintRegionMap &this_frame_paint_region_map, const PaintRegionMap &last_frame_paint_region_map, bool has_raster_cache, bool impeller_enabled)
SkRect GetCullRect() const
Dart_NativeFunction function
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
std::map< uint64_t, PaintRegion > PaintRegionMap
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
static constexpr SkRect MakeEmpty()