Home
last modified time | relevance | path

Searched refs:Range (Results 1 – 25 of 129) sorted by relevance

123456

/frameworks/minikin/include/minikin/
DRange.h27 class Range {
32 Range(uint32_t start, uint32_t end) : mStart(start), mEnd(end) {} in Range() function
33 Range() : Range(NOWHERE, NOWHERE) {} in Range() function
35 Range(const Range&) = default;
36 Range& operator=(const Range&) = default;
38 static Range invalidRange() { return Range(NOWHERE, NOWHERE); } in invalidRange()
55 inline std::pair<Range, Range> split(uint32_t pos) const { in split()
56 return std::make_pair(Range(mStart, pos), Range(pos, mEnd)); in split()
59 inline bool contains(const Range& other) const { in contains()
72 inline static bool intersects(const Range& left, const Range& right) { in intersects()
[all …]
DMeasuredText.h35 Run(const Range& range) : mRange(range) {} in Run()
51 virtual std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range,
53 virtual MinikinExtent getExtent(const U16StringPiece& text, const Range& range,
56 virtual void appendLayout(const U16StringPiece& text, const Range& range,
57 const Range& contextRange, const LayoutPieces& pieces,
71 const Range& /* hyphenPieceRange */, in measureHyphenPiece() argument
78 inline const Range& getRange() const { return mRange; } in getRange()
81 const Range mRange;
86 StyleRun(const Range& range, MinikinPaint&& paint, bool isRtl) in StyleRun()
96 std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range,
[all …]
DLayoutPieces.h32 Key(const Range& range, HyphenEdit hyphenEdit, bool dir, uint32_t paintId) in Key()
35 Range range;
56 return sizeof(Range) + sizeof(HyphenEdit) + sizeof(bool) + sizeof(uint32_t); in getMemoryUsage()
75 void insert(const Range& range, HyphenEdit edit, const LayoutPiece& layout, bool dir, in insert()
88 void getOrCreate(const U16StringPiece& textBuf, const Range& range, const Range& context, in getOrCreate()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DRangeTest.java20 import android.util.Range;
35 Range<Integer> intRange = new Range<Integer>(1, 1); in testConstructor()
41 Range<Integer> intRange2 = new Range<Integer>(100, 200); in testConstructor()
45 Range<Float> floatRange = new Range<Float>(Float.NEGATIVE_INFINITY, in testConstructor()
55 new Range<Integer>(null, null); in testIllegalValues()
62 new Range<Integer>(null, 0); in testIllegalValues()
69 new Range<Integer>(0, null); in testIllegalValues()
78 new Range<Integer>(50, -50); in testIllegalValues()
85 new Range<Float>(0.0f, Float.NEGATIVE_INFINITY); in testIllegalValues()
94 Range<Float> oneHalf = Range.create(1.0f, 2.0f); in testEquals()
[all …]
/frameworks/minikin/tests/unittest/
DBidiUtilsTest.cpp36 BidiText bidiText(text, Range(0, ltrLength), Bidi::LTR); in TEST()
39 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
45 BidiText bidiText(text, Range(0, ltrLength), Bidi::RTL); in TEST()
48 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
54 BidiText bidiText(text, Range(0, ltrLength), Bidi::DEFAULT_LTR); in TEST()
57 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
63 BidiText bidiText(text, Range(0, ltrLength), Bidi::DEFAULT_RTL); in TEST()
66 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
72 BidiText bidiText(text, Range(0, ltrLength), Bidi::FORCE_LTR); in TEST()
75 EXPECT_EQ(Range(0, ltrLength), (*it).range); in TEST()
[all …]
DLayoutCacheTest.cpp49 Range range(0, text.size()); in TEST()
77 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
79 layoutCache.getOrCreate(text2, Range(0, text2.size()), paint, false /* LTR */, in TEST()
85 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
87 layoutCache.getOrCreate(text1, Range(1, text1.size()), paint, false /* LTR */, in TEST()
93 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
95 layoutCache.getOrCreate(text2, Range(0, text2.size()), paint, false /* LTR */, in TEST()
101 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
103 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, true /* RTL */, in TEST()
109 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
[all …]
DMeasuredTextTest.cpp71 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(0, 0))); in TEST()
72 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
73 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 20.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
74 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(1, 2))); in TEST()
75 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 130.0f, 0.0f), mt->getBounds(text, Range(0, text.size()))); in TEST()
93 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(0, 0))); in TEST()
94 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
95 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 20.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
96 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(1, 2))); in TEST()
97 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(7, 7))); in TEST()
[all …]
DLayoutTest.cpp63 Range range(0, text.size()); in TEST_F()
81 Range range(0, text.size()); in TEST_F()
99 Range range(0, text.size()); in TEST_F()
117 Range range(0, text.size()); in TEST_F()
147 Range range(0, text.size()); in TEST_F()
165 Range range(0, text.size()); in TEST_F()
184 Range range(0, text.size()); in TEST_F()
204 Range range(0, text.size()); in TEST_F()
237 Range range(0, text.size()); in TEST_F()
255 Range range(0, text.size()); in TEST_F()
[all …]
/frameworks/base/core/java/android/util/
DRange.java39 public final class Range<T extends Comparable<? super T>> { class
54 public Range(final T lower, final T upper) { in Range() method in Range
77 public static <T extends Comparable<? super T>> Range<T> create(final T lower, final T upper) { in create()
78 return new Range<T>(lower, upper); in create()
131 public boolean contains(Range<T> range) { in contains()
154 } else if (obj instanceof Range) { in equals()
156 Range other = (Range) obj; in equals()
204 public Range<T> intersect(Range<T> range) { in intersect()
217 return Range.create( in intersect()
236 public Range<T> intersect(T lower, T upper) { in intersect()
[all …]
/frameworks/base/media/java/android/media/
DUtils.java33 import android.util.Range;
63 public static <T extends Comparable<? super T>> void sortDistinctRanges(Range<T>[] ranges) { in sortDistinctRanges()
64 Arrays.sort(ranges, new Comparator<Range<T>>() { in sortDistinctRanges()
66 public int compare(Range<T> lhs, Range<T> rhs) { in sortDistinctRanges()
85 Range<T>[] intersectSortedDistinctRanges(Range<T>[] one, Range<T>[] another) { in intersectSortedDistinctRanges()
87 Vector<Range<T>> result = new Vector<Range<T>>(); in intersectSortedDistinctRanges()
88 for (Range<T> range: another) { in intersectSortedDistinctRanges()
105 return result.toArray(new Range[result.size()]); in intersectSortedDistinctRanges()
117 int binarySearchDistinctRanges(Range<T>[] ranges, T value) { in binarySearchDistinctRanges()
118 return Arrays.binarySearch(ranges, Range.create(value, value), in binarySearchDistinctRanges()
[all …]
DMediaCodecInfo.java31 import android.util.Range;
190 private static final Range<Integer> POSITIVE_INTEGERS =
191 Range.create(1, Integer.MAX_VALUE);
192 private static final Range<Long> POSITIVE_LONGS =
193 Range.create(1l, Long.MAX_VALUE);
194 private static final Range<Rational> POSITIVE_RATIONALS =
195 Range.create(new Rational(1, Integer.MAX_VALUE),
197 private static final Range<Integer> SIZE_RANGE = Range.create(1, 32768);
198 private static final Range<Integer> FRAME_RATE_RANGE = Range.create(0, 960);
199 private static final Range<Integer> BITRATE_RANGE = Range.create(0, 500000000);
[all …]
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryableRange.java22 import android.util.Range;
34 implements MarshalQueryable<Range<T>> {
37 private class MarshalerRange extends Marshaler<Range<T>> {
38 private final Class<? super Range<T>> mClass;
39 private final Constructor<Range<T>> mConstructor;
44 protected MarshalerRange(TypeReference<Range<T>> typeReference, in MarshalerRange()
68 mConstructor = (Constructor<Range<T>>)mClass.getConstructor( in MarshalerRange()
76 public void marshal(Range<T> value, ByteBuffer buffer) { in marshal()
82 public Range<T> unmarshal(ByteBuffer buffer) { in unmarshal()
111 public int calculateMarshalSize(Range<T> value) { in calculateMarshalSize()
[all …]
/frameworks/base/services/people/java/com/android/server/people/data/
DEventIndex.java23 import android.util.Range;
95 private static final List<Function<Long, Range<Long>>> TIME_SLOT_FACTORIES =
151 public Range<Long> getMostRecentActiveTimeSlot() { in getMostRecentActiveTimeSlot()
157 Range<Long> lastTimeSlot = in getMostRecentActiveTimeSlot()
161 return Range.create(lastTimeSlot.getLower() - offset, in getMostRecentActiveTimeSlot()
175 public List<Range<Long>> getActiveTimeSlots() { in getActiveTimeSlots()
176 List<Range<Long>> activeTimeSlots = new ArrayList<>(); in getActiveTimeSlots()
315 private static long getDuration(Range<Long> timeSlot) { in getDuration()
324 Function<Long, Range<Long>> timeSlotFactory = TIME_SLOT_FACTORIES.get(timeSlotType); in diffTimeSlots()
325 Range<Long> fromSlot = timeSlotFactory.apply(fromTime); in diffTimeSlots()
[all …]
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/
Drange.h13 struct Range { struct
15 Range() {} in Range() argument
16 Range(Eigen::Vector<T, d> p1, Eigen::Vector<T, d> p2) : p1(p1), p2(p2) {} in Range() function
18 static Range<T, d> FromSize(Eigen::Vector<T, d> p1, in FromSize() argument
20 return Range<T, d>(p1, p1 + size); in FromSize()
23 bool operator==(const Range<T, d>& rhs) const {
37 typedef Range<int, 2> Range2i; argument
38 typedef Range<float, 2> Range2f;
/frameworks/minikin/libs/minikin/
DMeasuredText.cpp35 void setNextRange(const Range& range, bool dir) { in setNextRange()
50 Range mRange;
83 void setNextContext(const Range& range, HyphenEdit edit, bool dir) { in setNextContext()
100 Range mRange;
106 float StyleRun::measureHyphenPiece(const U16StringPiece& textBuf, const Range& range, in measureHyphenPiece()
136 const Range& range = run->getRange(); in measure()
178 void StyleRun::appendLayout(const U16StringPiece& textBuf, const Range& range, in appendLayout() argument
179 const Range& /* context */, const LayoutPieces& pieces, in appendLayout()
231 std::pair<float, MinikinRect> StyleRun::getBounds(const U16StringPiece& textBuf, const Range& range, in getBounds()
261 MinikinExtent StyleRun::getExtent(const U16StringPiece& textBuf, const Range& range, in getExtent()
[all …]
DLayoutSplitter.h57 LayoutSplitter(const U16StringPiece& textBuf, const Range& range, bool isRtl) in LayoutSplitter()
66 std::pair<Range, Range> operator*() const {
72 const Range& range = mParent->mRange;
94 const Range& range = mParent->mRange; in iterator()
111 Range mContextRange;
112 Range mPieceRange;
120 Range mRange; // The range in the original buffer. Used for range check.
DLineBreakerUtil.h68 const Range& contextRange, // A context range for measuring hyphenated piece. in populateHyphenationPoints()
69 const Range& hyphenationTargetRange, // An actual range for the hyphenation target. in populateHyphenationPoints()
88 run.measureHyphenPiece(firstText, Range(0, firstText.size()), in populateHyphenationPoints()
92 run.measureHyphenPiece(secondText, Range(0, secondText.size()), in populateHyphenationPoints()
133 inline Range wordRange() const { return breaker.wordRange(); } in wordRange()
136 inline Range contextRange() const { return Range(prevWordBreak, nextWordBreak); } in contextRange()
/frameworks/base/core/tests/coretests/src/android/util/
DRecurrenceRuleTest.java60 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testSimpleMonth()
62 assertEquals(new Range<>( in testSimpleMonth()
66 assertEquals(new Range<>( in testSimpleMonth()
80 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testSimpleDays()
82 assertEquals(new Range<>( in testSimpleDays()
86 assertEquals(new Range<>( in testSimpleDays()
101 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testNotRecurring()
103 assertEquals(new Range<>( in testNotRecurring()
115 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testNever()
125 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testSane()
[all …]
/frameworks/base/media/java/android/media/tv/tuner/frontend/
DFrontendInfo.java23 import android.util.Range;
34 private final Range<Integer> mFrequencyRange;
35 private final Range<Integer> mSymbolRateRange;
46 mFrequencyRange = new Range<>(minFrequency, maxFrequency); in FrontendInfo()
47 mSymbolRateRange = new Range<>(minSymbolRate, maxSymbolRate); in FrontendInfo()
72 public Range<Integer> getFrequencyRange() { in getFrequencyRange()
80 public Range<Integer> getSymbolRateRange() { in getSymbolRateRange()
/frameworks/base/telephony/java/android/telephony/
DModemActivityInfo.java24 import android.util.Range;
79 private static final Range<Integer>[] TX_POWER_RANGES = new Range[] {
80 new Range<>(Integer.MIN_VALUE, 0),
81 new Range<>(0, 5),
82 new Range<>(5, 15),
83 new Range<>(15, 20),
84 new Range<>(20, Integer.MAX_VALUE)
272 private Range<Integer> mPowerRangeInDbm;
274 public TransmitPower(@NonNull Range<Integer> range, int time) { in TransmitPower()
291 public Range<Integer> getPowerRangeInDbm() { in getPowerRangeInDbm()
/frameworks/base/tools/aapt2/compile/
DImage.h70 struct Range { struct
74 explicit Range() = default; argument
75 inline explicit Range(int32_t s, int32_t e) : start(s), end(e) {} in Range() argument
78 inline bool operator==(const Range& left, const Range& right) {
163 std::vector<Range> horizontal_stretch_regions;
170 std::vector<Range> vertical_stretch_regions;
203 ::std::ostream& operator<<(::std::ostream& out, const Range& range);
DNinePatch.cpp95 std::vector<Range>* primary_ranges, in FillRanges()
96 std::vector<Range>* secondary_ranges, in FillRanges()
120 primary_ranges->push_back(Range(idx - 1, length - 2)); in FillRanges()
122 secondary_ranges->push_back(Range(idx - 1, length - 2)); in FillRanges()
219 static bool PopulateBounds(const std::vector<Range>& padding, in PopulateBounds()
220 const std::vector<Range>& layout_bounds, in PopulateBounds()
221 const std::vector<Range>& stretch_regions, in PopulateBounds()
236 const Range& range = padding.front(); in PopulateBounds()
257 const Range& range = layout_bounds.front(); in PopulateBounds()
271 const Range& range = layout_bounds.back(); in PopulateBounds()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DEventIndexTest.java27 import android.util.Range;
67 Range<Long> mostRecentSlot = mEventIndex.getMostRecentActiveTimeSlot(); in testMultipleEvents()
71 List<Range<Long>> slots = mEventIndex.getActiveTimeSlots(); in testMultipleEvents()
82 List<Range<Long>> slots; in testBitmapShift()
120 List<Range<Long>> slots = mEventIndex.getActiveTimeSlots(); in testCopyConstructor()
123 List<Range<Long>> newSlots = newIndex.getActiveTimeSlots(); in testCopyConstructor()
145 List<Range<Long>> slots = combined.getActiveTimeSlots(); in combineEventIndexes()
154 long expectedLower, long expectedUpper, Range<Long> actualSlot) { in assertTimeSlot()
/frameworks/base/core/java/android/hardware/camera2/params/
DRecommendedStreamConfigurationMap.java31 import android.util.Range;
320 private Set<Range<Integer>> getUnmodifiableRangeSet(Range<Integer>[] rangeArray) { in getUnmodifiableRangeSet()
322 ArraySet<Range<Integer>> rangeSet = new ArraySet<Range<Integer>>(); in getUnmodifiableRangeSet()
343 public @Nullable Set<Range<Integer>> getHighSpeedVideoFpsRangesFor(@NonNull Size size) { in getHighSpeedVideoFpsRangesFor()
355 public @Nullable Set<Range<Integer>> getHighSpeedVideoFpsRanges() { in getHighSpeedVideoFpsRanges()
373 public @Nullable Set<Size> getHighSpeedVideoSizesFor(@NonNull Range<Integer> fpsRange) { in getHighSpeedVideoSizesFor()
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/
DTonalTest.java25 import android.util.Range;
103 Tonal.ColorRange colorRange = new Tonal.ColorRange(new Range<>(0f, 50f), in colorRange_containsColor()
104 new Range<>(0f, 1f), new Range<>(0f, 1f)); in colorRange_containsColor()
112 Tonal.ColorRange colorRange = new Tonal.ColorRange(new Range<>(0f, 50f), in colorRange_doesntContainColor()
113 new Range<>(0f, 0.5f), new Range<>(0f, 0.5f)); in colorRange_doesntContainColor()

123456