Home
last modified time | relevance | path

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

12345

/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/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,
63 const Range& /* hyphenPieceRange */, in measureHyphenPiece() argument
70 inline const Range& getRange() const { return mRange; } in getRange()
73 const Range mRange;
78 StyleRun(const Range& range, MinikinPaint&& paint, bool isRtl) in StyleRun()
92 std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range, in getBounds()
100 float measureHyphenPiece(const U16StringPiece& text, const Range& range, in measureHyphenPiece()
115 ReplacementRun(const Range& range, float width, uint32_t localeListId) in ReplacementRun()
129 const Range& /* range */, in getBounds() argument
[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.cpp48 Range range(0, text.size()); in TEST()
76 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
78 layoutCache.getOrCreate(text2, Range(0, text2.size()), paint, false /* LTR */, in TEST()
84 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
86 layoutCache.getOrCreate(text1, Range(1, text1.size()), paint, false /* LTR */, in TEST()
92 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
94 layoutCache.getOrCreate(text2, Range(0, text2.size()), paint, false /* LTR */, in TEST()
100 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
102 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, true /* RTL */, in TEST()
108 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
[all …]
DLayoutTest.cpp50 Range range(0, utf16.size()); in doLayout()
60 Range range(0, utf16.size()); in doLayoutWithPrecomputedPieces()
94 Range range(0, text.size()); in TEST_F()
114 Range range(0, text.size()); in TEST_F()
134 Range range(0, text.size()); in TEST_F()
154 Range range(0, text.size()); in TEST_F()
190 Range range(0, text.size()); in TEST_F()
210 Range range(0, text.size()); in TEST_F()
234 Range range(0, text.size()); in TEST_F()
256 Range range(0, text.size()); in TEST_F()
[all …]
/frameworks/base/media/java/android/media/
DUtils.java28 import android.util.Range;
46 public static <T extends Comparable<? super T>> void sortDistinctRanges(Range<T>[] ranges) { in sortDistinctRanges()
47 Arrays.sort(ranges, new Comparator<Range<T>>() { in sortDistinctRanges()
49 public int compare(Range<T> lhs, Range<T> rhs) { in sortDistinctRanges()
68 Range<T>[] intersectSortedDistinctRanges(Range<T>[] one, Range<T>[] another) { in intersectSortedDistinctRanges()
70 Vector<Range<T>> result = new Vector<Range<T>>(); in intersectSortedDistinctRanges()
71 for (Range<T> range: another) { in intersectSortedDistinctRanges()
88 return result.toArray(new Range[result.size()]); in intersectSortedDistinctRanges()
100 int binarySearchDistinctRanges(Range<T>[] ranges, T value) { in binarySearchDistinctRanges()
101 return Arrays.binarySearch(ranges, Range.create(value, value), in binarySearchDistinctRanges()
[all …]
DMediaCodecInfo.java23 import android.util.Range;
119 private static final Range<Integer> POSITIVE_INTEGERS =
120 Range.create(1, Integer.MAX_VALUE);
121 private static final Range<Long> POSITIVE_LONGS =
122 Range.create(1l, Long.MAX_VALUE);
123 private static final Range<Rational> POSITIVE_RATIONALS =
124 Range.create(new Rational(1, Integer.MAX_VALUE),
126 private static final Range<Integer> SIZE_RANGE = Range.create(1, 32768);
127 private static final Range<Integer> FRAME_RATE_RANGE = Range.create(0, 960);
128 private static final Range<Integer> BITRATE_RANGE = Range.create(0, 500000000);
[all …]
/frameworks/support/core/ktx/src/main/java/androidx/core/util/
DRange.kt21 import android.util.Range
30 inline infix fun <T : Comparable<T>> T.rangeTo(that: T): Range<T> = Range(this, that) in rangeTo()
34 inline operator fun <T : Comparable<T>> Range<T>.plus(value: T): Range<T> = extend(value) in rangeTo()
38 inline operator fun <T : Comparable<T>> Range<T>.plus(other: Range<T>): Range<T> = extend(other) in rangeTo()
46 inline infix fun <T : Comparable<T>> Range<T>.and(other: Range<T>): Range<T> = intersect(other) in rangeTo()
50 fun <T : Comparable<T>> Range<T>.toClosedRange(): ClosedRange<T> = object : ClosedRange<T> { in rangeTo()
57 fun <T : Comparable<T>> ClosedRange<T>.toRange(): Range<T> = Range(start, endInclusive)
/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 …]
DRecurrenceRule.java165 public Iterator<Range<ZonedDateTime>> cycleIterator() { in cycleIterator()
173 private class NonrecurringIterator implements Iterator<Range<ZonedDateTime>> {
186 public Range<ZonedDateTime> next() { in next()
188 return new Range<>(start, end); in next()
192 private class RecurringIterator implements Iterator<Range<ZonedDateTime>> {
238 public Range<ZonedDateTime> next() { in next()
240 Range<ZonedDateTime> r = new Range<>(cycleStart, cycleEnd); in next()
/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/native/libs/vr/libdvrcommon/include/private/dvr/
Drange.h13 struct Range { struct
15 Range() {} in Range() function
16 Range(Eigen::Vector<T, d> p1, Eigen::Vector<T, d> p2) : p1(p1), p2(p2) {} in Range() argument
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/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/support/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/
DRangeTest.java19 import static androidx.recyclerview.selection.Range.TYPE_PRIMARY;
20 import static androidx.recyclerview.selection.Range.TYPE_PROVISIONAL;
48 private Range mRange;
58 mRange = new Range(0, mSpy); in testEstablishRange()
67 mRange = new Range(0, mSpy); in testExpandRange()
76 mRange = new Range(0, mSpy); in testContractRange()
85 mRange = new Range(10, mSpy); in testFlipRange_InitiallyDescending()
99 mRange = new Range(10, mSpy); in testFlipRange_InitiallyAscending()
117 mRange = new Range(0, mSpy); in testCouriesRangeType()
151 private static final class RangeSpy extends Range.Callbacks {
/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() function
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/minikin/libs/minikin/
DMeasuredText.cpp35 const Range& range = run->getRange(); in measure()
58 void MeasuredText::buildLayout(const U16StringPiece& textBuf, const Range& range, in buildLayout()
66 MinikinRect MeasuredText::getBounds(const U16StringPiece& textBuf, const Range& range) { in getBounds()
70 const Range& runRange = run->getRange(); in getBounds()
71 if (!Range::intersects(range, runRange)) { in getBounds()
75 run->getBounds(textBuf, Range::intersection(runRange, range), layoutPieces); in getBounds()
DLineBreakerUtil.h73 const Range& contextRange, // A context range for measuring hyphenated piece. in populateHyphenationPoints()
74 const Range& hyphenationTargetRange, // An actual range for the hyphenation target. in populateHyphenationPoints()
92 const float first = run.measureHyphenPiece(firstText, Range(0, firstText.size()), in populateHyphenationPoints()
96 const float second = run.measureHyphenPiece(secondText, Range(0, secondText.size()), in populateHyphenationPoints()
138 inline Range wordRange() const { return breaker.wordRange(); } in wordRange()
141 inline Range contextRange() const { return Range(prevWordBreak, nextWordBreak); } in contextRange()
DCmapCoverage.cpp81 static inline Range getRange(const std::vector<uint32_t>& r, size_t i) { in getRange()
82 return i + 1 < r.size() ? Range({r[i], r[i + 1]}) : Range::invalidRange(); in getRange()
96 Range left = getRange(lRanges, li); in mergeRanges()
97 Range right = getRange(rRanges, ri); in mergeRanges()
102 Range r = getRange(lRanges, li); in mergeRanges()
110 Range r = getRange(rRanges, ri); in mergeRanges()
115 } else if (!Range::intersects(left, right)) { in mergeRanges()
127 Range merged = Range::merge(left, right); in mergeRanges()
132 while (Range::intersects(merged, left) || Range::intersects(merged, right)) { in mergeRanges()
133 if (Range::intersects(merged, left)) { in mergeRanges()
[all …]
DBidiUtils.cpp64 return {Range::invalidRange(), false}; in getRunInfoAt()
70 return {Range::invalidRange(), false}; in getRunInfoAt()
72 return {Range(runStart, runEnd), (runDir == UBIDI_RTL)}; in getRunInfoAt()
75 BidiText::BidiText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags) in BidiText()
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/util/
DRangeTest.kt20 import android.util.Range
27 val range: Range<String> = "a" rangeTo "c" in infixFactory()
51 val range: Range<Int> = (1..3).toRange() in kotlinToAndroid()
57 val range: ClosedRange<String> = Range<String>("a", "c").toClosedRange() in androidToKotlin()
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/
DTonalTest.java26 import android.util.Range;
71 Tonal.ColorRange colorRange = new Tonal.ColorRange(new Range<>(0f, 50f), in colorRange_containsColor()
72 new Range<>(0f, 1f), new Range<>(0f, 1f)); in colorRange_containsColor()
80 Tonal.ColorRange colorRange = new Tonal.ColorRange(new Range<>(0f, 50f), in colorRange_doesntContainColor()
81 new Range<>(0f, 0.5f), new Range<>(0f, 0.5f)); in colorRange_doesntContainColor()
/frameworks/base/core/java/android/hardware/camera2/params/
DHighSpeedVideoConfiguration.java23 import android.util.Range;
64 mFpsRange = new Range<Integer>(mFpsMin, mFpsMax); in HighSpeedVideoConfiguration()
126 public Range<Integer> getFpsRange() { in getFpsRange()
171 private final Range<Integer> mFpsRange;
/frameworks/support/recyclerview-selection/src/main/java/androidx/recyclerview/selection/
DDefaultSelectionTracker.java31 import androidx.recyclerview.selection.Range.RangeType;
68 private @Nullable Range mRange;
256 extendRange(position, Range.TYPE_PRIMARY); in extendRange()
271 mRange = new Range(position, mRangeCallbacks); in anchorRange()
282 extendRange(position, Range.TYPE_PROVISIONAL); in extendProvisionalRange()
429 case Range.TYPE_PRIMARY: in updateForRange()
432 case Range.TYPE_PROVISIONAL: in updateForRange()
520 private final class RangeCallbacks extends Range.Callbacks {
524 case Range.TYPE_PRIMARY: in updateForRange()
527 case Range.TYPE_PROVISIONAL: in updateForRange()

12345