MCPcopy Create free account
hub / github.com/Tencent/libpag / UnionTimeRanges

Function UnionTimeRanges

src/rendering/utils/MemoryCalculator.cpp:209–214  ·  view source on GitHub ↗

Method will make mistake when ranges don't have intersection

Source from the content-addressed store, hash-verified

207
208// Method will make mistake when ranges don't have intersection
209static TimeRange UnionTimeRanges(const TimeRange& range, const TimeRange& otherRange) {
210 TimeRange unionRange;
211 unionRange.start = range.start < otherRange.start ? range.start : otherRange.start;
212 unionRange.end = range.end > otherRange.end ? range.end : otherRange.end;
213 return unionRange;
214}
215
216void MemoryCalculator::UpdateTimeRangesMapIfNeed(
217 void* resource, TimeRange timeRange,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected