5#ifndef FLUTTER_DISPLAY_LIST_GEOMETRY_DL_REGION_H_
6#define FLUTTER_DISPLAY_LIST_GEOMETRY_DL_REGION_H_
25 explicit DlRegion(
const std::vector<SkIRect>& rects);
49 std::vector<SkIRect>
getRects(
bool deband =
true)
const;
62 bool isEmpty()
const {
return lines_.empty(); }
72 typedef std::uint32_t SpanChunkHandle;
79 Span(int32_t left, int32_t right) : left(left), right(right) {}
87 SpanBuffer() =
default;
88 SpanBuffer(
const SpanBuffer&);
89 SpanBuffer(SpanBuffer&&
m);
93 void reserve(
size_t capacity);
94 size_t capacity()
const {
return capacity_; }
96 SpanChunkHandle storeChunk(
const Span*
begin,
const Span* end);
97 size_t getChunkSize(SpanChunkHandle handle)
const;
98 void getSpans(SpanChunkHandle handle,
99 const DlRegion::Span*&
begin,
100 const DlRegion::Span*& end)
const;
105 void setChunkSize(SpanChunkHandle handle,
size_t size);
107 size_t capacity_ = 0;
112 Span* spans_ =
nullptr;
118 SpanChunkHandle chunk_handle;
121 void setRects(
const std::vector<SkIRect>& rects);
123 void appendLine(int32_t top,
127 void appendLine(int32_t top,
130 SpanChunkHandle handle) {
133 appendLine(top, bottom,
begin, end);
136 typedef std::vector<Span> SpanVec;
137 SpanLine makeLine(int32_t top, int32_t bottom,
const SpanVec&);
138 SpanLine makeLine(int32_t top,
142 static size_t unionLineSpans(std::vector<Span>& res,
143 const SpanBuffer& a_buffer,
144 SpanChunkHandle a_handle,
145 const SpanBuffer& b_buffer,
146 SpanChunkHandle b_handle);
147 static size_t intersectLineSpans(std::vector<Span>& res,
148 const SpanBuffer& a_buffer,
149 SpanChunkHandle a_handle,
150 const SpanBuffer& b_buffer,
151 SpanChunkHandle b_handle);
153 bool spansEqual(SpanLine&
line,
const Span*
begin,
const Span* end)
const;
155 static bool spansIntersect(
const Span* begin1,
160 static void getIntersectionIterators(
161 const std::vector<SpanLine>& a_lines,
162 const std::vector<SpanLine>& b_lines,
163 std::vector<SpanLine>::const_iterator& a_it,
164 std::vector<SpanLine>::const_iterator& b_it);
166 std::vector<SpanLine> lines_;
168 SpanBuffer span_buffer_;
static DlRegion MakeIntersection(const DlRegion &a, const DlRegion &b)
const SkIRect & bounds() const
std::vector< SkIRect > getRects(bool deband=true) const
DlRegion & operator=(const DlRegion &)=default
bool isEmpty() const
Returns true if region is empty (contains no rectangles).
DlRegion(DlRegion &&)=default
bool intersects(const SkIRect &rect) const
Returns whether this region intersects with a rectangle.
bool isComplex() const
Returns true if region is not empty and contains more than one rectangle.
DlRegion & operator=(DlRegion &&)=default
DlRegion(const DlRegion &)=default
static DlRegion MakeUnion(const DlRegion &a, const DlRegion &b)
DlRegion()=default
Creates an empty region.
static const char * begin(const StringSlice &s)
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static constexpr SkIRect MakeEmpty()