Home
last modified time | relevance | path

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

12345678910

/frameworks/minikin/include/minikin/
DRange.h28 class Range {
33 Range(uint32_t start, uint32_t end) : mStart(start), mEnd(end) {} in Range() function
34 Range() : Range(NOWHERE, NOWHERE) {} in Range() function
36 Range(const Range&) = default;
37 Range& operator=(const Range&) = default;
39 static Range invalidRange() { return Range(NOWHERE, NOWHERE); } in invalidRange()
56 inline std::pair<Range, Range> split(uint32_t pos) const { in split()
57 return std::make_pair(Range(mStart, pos), Range(pos, mEnd)); in split()
60 inline bool contains(const Range& other) const { in contains()
73 inline static bool intersects(const Range& left, const Range& right) { in intersects()
[all …]
DMeasuredText.h57 Run(const Range& range) : mRange(range) {} in Run()
83 virtual std::pair<float, MinikinRect> getBounds(const U16StringPiece& text, const Range& range,
85 virtual MinikinExtent getExtent(const U16StringPiece& text, const Range& range,
88 virtual LineMetrics getLineMetrics(const U16StringPiece& text, const Range& range,
91 virtual void appendLayout(const U16StringPiece& text, const Range& range,
92 const Range& contextRange, const LayoutPieces& pieces,
108 const Range& /* hyphenPieceRange */, in measureHyphenPiece() argument
115 inline const Range& getRange() const { return mRange; } in getRange()
127 const Range mRange;
132 StyleRun(const Range& range, MinikinPaint&& paint, int lineBreakStyle, int lineBreakWordStyle, in StyleRun()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DRangeTest.java19 import android.util.Range;
36 Range<Integer> intRange = new Range<Integer>(1, 1); in testConstructor()
42 Range<Integer> intRange2 = new Range<Integer>(100, 200); in testConstructor()
46 Range<Float> floatRange = new Range<Float>(Float.NEGATIVE_INFINITY, in testConstructor()
56 new Range<Integer>(null, null); in testIllegalValues()
63 new Range<Integer>(null, 0); in testIllegalValues()
70 new Range<Integer>(0, null); in testIllegalValues()
79 new Range<Integer>(50, -50); in testIllegalValues()
86 new Range<Float>(0.0f, Float.NEGATIVE_INFINITY); in testIllegalValues()
95 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.cpp55 Range range(0, text.size()); in TEST()
83 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
85 layoutCache.getOrCreate(text2, Range(0, text2.size()), paint, false /* LTR */, in TEST()
91 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
93 layoutCache.getOrCreate(text1, Range(1, text1.size()), paint, false /* LTR */, in TEST()
99 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
101 layoutCache.getOrCreate(text2, Range(0, text2.size()), paint, false /* LTR */, in TEST()
107 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
109 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, true /* RTL */, in TEST()
115 layoutCache.getOrCreate(text1, Range(0, text1.size()), paint, false /* LTR */, in TEST()
[all …]
DMeasuredTextTest.cpp80 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(0, 0))); in TEST()
81 EXPECT_EQ(MinikinRect(0.0f, -10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
82 EXPECT_EQ(MinikinRect(0.0f, -10.0f, 20.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
83 EXPECT_EQ(MinikinRect(0.0f, -10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(1, 2))); in TEST()
84 EXPECT_EQ(MinikinRect(0.0f, -10.0f, 130.0f, 0.0f), mt->getBounds(text, Range(0, text.size()))); in TEST()
102 EXPECT_EQ(MinikinRect(0.0f, -10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
120 EXPECT_EQ(MinikinRect(0.0f, -30.0f, 30.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
151 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(0, 0))); in TEST()
152 EXPECT_EQ(MinikinRect(0.0f, -10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
153 EXPECT_EQ(MinikinRect(0.0f, -10.0f, 20.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
[all …]
DLayoutTest.cpp41 getBounds(text, Range(0, text.size()), bidiFlags, paint, StartHyphenEdit::NO_EDIT, in getBounds()
70 Range range(0, text.size()); in TEST_F()
89 Range range(0, text.size()); in TEST_F()
108 Range range(0, text.size()); in TEST_F()
127 Range range(0, text.size()); in TEST_F()
158 Range range(0, text.size()); in TEST_F()
177 Range range(0, text.size()); in TEST_F()
197 Range range(0, text.size()); in TEST_F()
218 Range range(0, text.size()); in TEST_F()
252 Range range(0, text.size()); in TEST_F()
[all …]
/frameworks/base/core/java/android/util/
DRange.java42 public final class Range<T extends Comparable<? super T>> { class
57 public Range(final T lower, final T upper) { in Range() method in Range
80 public static <T extends Comparable<? super T>> Range<T> create(final T lower, final T upper) { in create()
81 return new Range<T>(lower, upper); in create()
134 public boolean contains(Range<T> range) { in contains()
157 } else if (obj instanceof Range) { in equals()
159 Range other = (Range) obj; in equals()
207 public Range<T> intersect(Range<T> range) { in intersect()
220 return Range.create( in intersect()
239 public Range<T> intersect(T lower, T upper) { in intersect()
[all …]
/frameworks/base/media/java/android/media/
DUtils.java32 import android.util.Range;
62 public static <T extends Comparable<? super T>> void sortDistinctRanges(Range<T>[] ranges) { in sortDistinctRanges()
63 Arrays.sort(ranges, new Comparator<Range<T>>() { in sortDistinctRanges()
65 public int compare(Range<T> lhs, Range<T> rhs) { in sortDistinctRanges()
84 Range<T>[] intersectSortedDistinctRanges(Range<T>[] one, Range<T>[] another) { in intersectSortedDistinctRanges()
86 Vector<Range<T>> result = new Vector<Range<T>>(); in intersectSortedDistinctRanges()
87 for (Range<T> range: another) { in intersectSortedDistinctRanges()
104 return result.toArray(new Range[result.size()]); in intersectSortedDistinctRanges()
116 int binarySearchDistinctRanges(Range<T>[] ranges, T value) { in binarySearchDistinctRanges()
117 return Arrays.binarySearch(ranges, Range.create(value, value), in binarySearchDistinctRanges()
[all …]
DMediaCodecInfo.java42 import android.util.Range;
208 private static final Range<Integer> POSITIVE_INTEGERS =
209 Range.create(1, Integer.MAX_VALUE);
210 private static final Range<Long> POSITIVE_LONGS =
211 Range.create(1L, Long.MAX_VALUE);
212 private static final Range<Rational> POSITIVE_RATIONALS =
213 Range.create(new Rational(1, Integer.MAX_VALUE),
215 private static final Range<Integer> FRAME_RATE_RANGE = Range.create(0, 960);
216 private static final Range<Integer> BITRATE_RANGE = Range.create(0, 500000000);
221 private static final Range<Integer> SIZE_RANGE = Process.is64Bit()
[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() 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/telephony/java/android/telephony/ims/
DAudioCodecAttributes.java23 import android.util.Range;
36 private Range<Float> mBitrateRangeKbps;
40 private Range<Float> mBandwidthRangeKhz;
52 public AudioCodecAttributes(float bitrateKbps, @NonNull Range<Float> bitrateRangeKbps, in AudioCodecAttributes()
53 float bandwidthKhz, @NonNull Range<Float> bandwidthRangeKhz) { in AudioCodecAttributes()
62 mBitrateRangeKbps = new Range<>(in.readFloat(), in.readFloat()); in AudioCodecAttributes()
64 mBandwidthRangeKhz = new Range<>(in.readFloat(), in.readFloat()); in AudioCodecAttributes()
105 public @NonNull Range<Float> getBitrateRangeKbps() { in getBitrateRangeKbps()
119 public @NonNull Range<Float> getBandwidthRangeKhz() { in getBandwidthRangeKhz()
/frameworks/base/media/java/android/media/tv/tuner/frontend/
DFrontendInfo.java23 import android.util.Range;
37 private final Range<Long> mFrequencyRange;
38 private final Range<Integer> mSymbolRateRange;
53 mFrequencyRange = new Range<>(minFrequency, maxFrequency); in FrontendInfo()
54 mSymbolRateRange = new Range<>(minSymbolRate, maxSymbolRate); in FrontendInfo()
85 public Range<Integer> getFrequencyRange() { in getFrequencyRange()
86 return new Range<>( in getFrequencyRange()
94 public Range<Long> getFrequencyRangeLong() { in getFrequencyRangeLong()
102 public Range<Integer> getSymbolRateRange() { in getSymbolRateRange()
/frameworks/minikin/libs/minikin/
DMeasuredText.cpp36 void setNextRange(const Range& range, bool dir) { in setNextRange()
58 Range mRange;
110 for (const BidiText::RunInfo info : BidiText(textBuf, Range(0, textBuf.length()), bidiFlag)) { in measureText()
125 void setNextContext(const Range& range, HyphenEdit edit, bool dir) { in setNextContext()
143 Range mRange;
149 float StyleRun::measureHyphenPiece(const U16StringPiece& textBuf, const Range& range, in measureHyphenPiece()
180 const Range& range = run->getRange(); in measure()
225 void StyleRun::appendLayout(const U16StringPiece& textBuf, const Range& range, in appendLayout() argument
226 const Range& /* context */, const LayoutPieces& pieces, in appendLayout()
278 std::pair<float, MinikinRect> StyleRun::getBounds(const U16StringPiece& textBuf, const Range& range, in getBounds()
[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.
DGreedyLineBreaker.cpp95 bool tryLineBreakWithHyphenation(const Range& range, WordBreaker* breaker);
103 bool doLineBreakWithGraphemeBounds(const Range& range);
105 bool overhangExceedLineLimit(const Range& range);
106 bool doLineBreakWithFallback(const Range& range);
178 bool GreedyLineBreaker::tryLineBreakWithHyphenation(const Range& range, WordBreaker* breaker) { in tryLineBreakWithHyphenation()
194 const Range targetRange = breaker->wordRange(); in tryLineBreakWithHyphenation()
205 Range contextRange = range; in tryLineBreakWithHyphenation()
276 bool GreedyLineBreaker::doLineBreakWithGraphemeBounds(const Range& range) { in doLineBreakWithGraphemeBounds()
287 overhangExceedLineLimit(Range(range.getStart(), i + 1))) { in doLineBreakWithGraphemeBounds()
306 bool GreedyLineBreaker::doLineBreakWithFallback(const Range& range) { in doLineBreakWithFallback()
[all …]
DLineBreakerUtil.h60 inline Range trimTrailingLineEndSpaces(const U16StringPiece& textBuf, const Range& range) { in trimTrailingLineEndSpaces()
63 return Range(range.getStart(), range.getEnd() - i); in trimTrailingLineEndSpaces()
66 return Range(range.getStart(), range.getStart()); in trimTrailingLineEndSpaces()
79 const Range& contextRange, // A context range for measuring hyphenated piece. in populateHyphenationPoints()
80 const Range& hyphenationTargetRange, // An actual range for the hyphenation target. in populateHyphenationPoints()
102 run.measureHyphenPiece(firstText, Range(0, firstText.size()), in populateHyphenationPoints()
106 run.measureHyphenPiece(secondText, Range(0, secondText.size()), in populateHyphenationPoints()
228 inline Range wordRange() const { return breaker.wordRange(); } in wordRange()
231 inline Range contextRange() const { return Range(prevWordBreak, nextWordBreak); } in contextRange()
DScriptUtils.h36 Range range;
54 inline std::pair<Range, hb_script_t> operator*() const {
55 return std::make_pair(Range(mStart, mEnd), mScript);
82 Range mRange;
84 static std::pair<uint32_t, hb_script_t> getScriptRun(U16StringPiece text, Range range,
/frameworks/base/core/tests/coretests/src/android/util/
DRecurrenceRuleTest.java68 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testSimpleMonth()
70 assertEquals(new Range<>( in testSimpleMonth()
74 assertEquals(new Range<>( in testSimpleMonth()
89 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testSimpleDays()
91 assertEquals(new Range<>( in testSimpleDays()
95 assertEquals(new Range<>( in testSimpleDays()
111 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testNotRecurring()
113 assertEquals(new Range<>( in testNotRecurring()
126 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testNever()
137 final Iterator<Range<ZonedDateTime>> it = r.cycleIterator(); in testSane()
[all …]
/frameworks/base/libs/androidfw/include/androidfw/
DImage.h69 struct Range { struct
73 explicit Range() = default; argument
74 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);
/frameworks/av/media/module/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/libs/androidfw/
DNinePatch.cpp91 std::vector<Range>* primary_ranges, std::vector<Range>* secondary_ranges, in FillRanges()
115 primary_ranges->push_back(Range(idx - 1, length - 2)); in FillRanges()
117 secondary_ranges->push_back(Range(idx - 1, length - 2)); in FillRanges()
220 static bool PopulateBounds(const std::vector<Range>& padding, in PopulateBounds()
221 const std::vector<Range>& layout_bounds, in PopulateBounds()
222 const std::vector<Range>& stretch_regions, const int32_t length, in PopulateBounds()
235 const Range& range = padding.front(); in PopulateBounds()
255 const Range& range = layout_bounds.front(); in PopulateBounds()
268 const Range& range = layout_bounds.back(); in PopulateBounds()
281 static int32_t CalculateSegmentCount(const std::vector<Range>& stretch_regions, int32_t length) { in CalculateSegmentCount()
[all …]
/frameworks/av/media/libeffects/lvm/tests/
DEffectReverbTest.cpp124 ::testing::Combine(::testing::Range(0, (int)kNumChMasks),
125 ::testing::Range(0, (int)kNumSampleRates),
126 ::testing::Range(0, (int)kNumFrameCounts),
127 ::testing::Range(0, (int)kNumLoopCounts),
128 ::testing::Range(0, (int)kNumEffectUuids),
129 ::testing::Range(0, (int)kNumPresets)));
249 ::testing::Combine(::testing::Range(0, (int)kNumSampleRates),
250 ::testing::Range(0, (int)kNumFrameCounts),
251 ::testing::Range(0, (int)kNumLoopCounts),
252 ::testing::Range(0, (int)kNumEffectUuids),
[all …]

12345678910