Home
last modified time | relevance | path

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

12345

/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 …]
DLayoutSplitterTest.cpp29 std::pair<std::vector<uint16_t>, Range> parseTestString(const std::string& text) { in parseTestString()
31 Range range; in parseTestString()
48 std::pair<Range, Range> parseExpectString(const std::string& text) { in parseExpectString()
50 Range context; in parseExpectString()
51 Range piece; in parseExpectString()
74 std::string buildDebugString(const U16StringPiece& textBuf, const Range& context, in buildDebugString()
75 const Range& piece) { in buildDebugString()
/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.java30 import android.util.Range;
189 private static final Range<Integer> POSITIVE_INTEGERS =
190 Range.create(1, Integer.MAX_VALUE);
191 private static final Range<Long> POSITIVE_LONGS =
192 Range.create(1l, Long.MAX_VALUE);
193 private static final Range<Rational> POSITIVE_RATIONALS =
194 Range.create(new Rational(1, Integer.MAX_VALUE),
196 private static final Range<Integer> SIZE_RANGE = Range.create(1, 32768);
197 private static final Range<Integer> FRAME_RATE_RANGE = Range.create(0, 960);
198 private static final Range<Integer> BITRATE_RANGE = Range.create(0, 500000000);
[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/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() 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()
DCmapCoverage.cpp82 static inline Range getRange(const std::vector<uint32_t>& r, size_t i) { in getRange()
83 return i + 1 < r.size() ? Range({r[i], r[i + 1]}) : Range::invalidRange(); in getRange()
97 Range left = getRange(lRanges, li); in mergeRanges()
98 Range right = getRange(rRanges, ri); in mergeRanges()
103 Range r = getRange(lRanges, li); in mergeRanges()
111 Range r = getRange(rRanges, ri); in mergeRanges()
116 } else if (!Range::intersects(left, right)) { in mergeRanges()
128 Range merged = Range::merge(left, right); in mergeRanges()
133 while (Range::intersects(merged, left) || Range::intersects(merged, right)) { in mergeRanges()
134 if (Range::intersects(merged, left)) { in mergeRanges()
[all …]
/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/telephony/java/android/telephony/
DModemActivityInfo.java24 import android.util.Range;
46 private static final Range<Integer>[] TX_POWER_RANGES = new Range[] {
47 new Range<>(Integer.MIN_VALUE, 0),
48 new Range<>(0, 5),
49 new Range<>(5, 15),
50 new Range<>(15, 20),
51 new Range<>(20, Integer.MAX_VALUE)
239 private Range<Integer> mPowerRangeInDbm;
241 public TransmitPower(@NonNull Range<Integer> range, int time) { in TransmitPower()
258 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() 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/av/media/libstagefright/foundation/tests/colorutils/
DColorUtilsTest.cpp39 class ColorRangeTest : public ::testing::TestWithParam</* ColorRange */ CA::Range> {
43 CA::Range mRange;
92 /* ColorRange */ CA::Range,
106 CA::Range mRange;
130 /* ColorRange */ CA::Range,
146 CA::Range mRange;
156 CA::Range unwrappedRange; in TEST_P()
312 origAspects.mRange = CA::Range::RangeFull; in TEST()
318 aspects.mRange = CA::Range::RangeFull; in TEST()
326 aspects.mRange = CA::Range::RangeLimited; in TEST()
[all …]
/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()

12345