Home
last modified time | relevance | path

Searched refs:rects (Results 1 – 25 of 48) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/android/view/
DInsetsSourceTest.java287 final Rect[] rects = mSource.calculateBoundingRects(new Rect(0, 0, 1000, 1000), false); in testCalculateBoundingRects_noBoundingRects_createsSingleRect() local
289 assertEquals(1, rects.length); in testCalculateBoundingRects_noBoundingRects_createsSingleRect()
290 assertEquals(new Rect(0, 0, 1000, 100), rects[0]); in testCalculateBoundingRects_noBoundingRects_createsSingleRect()
298 final Rect[] rects = mSource.calculateBoundingRects(new Rect(100, 100, 1100, 1100), false); in testCalculateBoundingRects_noBoundingRectsAndFrameNotAtOrigin_createsSingleRect() local
300 assertEquals(1, rects.length); in testCalculateBoundingRects_noBoundingRectsAndFrameNotAtOrigin_createsSingleRect()
301 assertEquals(new Rect(0, 0, 1000, 100), rects[0]); in testCalculateBoundingRects_noBoundingRectsAndFrameNotAtOrigin_createsSingleRect()
309 final Rect[] rects = mSource.calculateBoundingRects(new Rect(0, 0, 500, 1000), false); in testCalculateBoundingRects_noBoundingRectsAndLargerFrame_singleRectFitsRelFrame() local
311 assertEquals(1, rects.length); in testCalculateBoundingRects_noBoundingRectsAndLargerFrame_singleRectFitsRelFrame()
312 assertEquals(new Rect(0, 0, 500, 100), rects[0]); in testCalculateBoundingRects_noBoundingRectsAndLargerFrame_singleRectFitsRelFrame()
323 final Rect[] rects = mSource.calculateBoundingRects(new Rect(0, 0, 1000, 1000), false); in testCalculateBoundingRects_frameAtOrigin_resultRelativeToRelFrame() local
[all …]
/frameworks/native/libs/ui/include_private/ui/
DRegionHelper.h47 RECT const* rects; member
52 : rects(rhs.rects), count(rhs.count), dx(rhs.dx), dy(rhs.dy) {} in region()
53 inline region(RECT const* _r, size_t _c) : rects(_r), count(_c), dx(), dy() {} in region()
55 : rects(_r), count(_c), dx(_dx), dy(_dy) {} in region()
153 SpannerBase::lhs_head = lhs.rects->top + lhs.dy; in Spanner()
154 SpannerBase::lhs_tail = lhs.rects->bottom + lhs.dy; in Spanner()
157 SpannerBase::rhs_head = rhs.rects->top + rhs.dy; in Spanner()
158 SpannerBase::rhs_tail = rhs.rects->bottom + rhs.dy; in Spanner()
181 RECT const* rects = reg.rects; in advance() local
182 RECT const* const end = rects + count; in advance()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/utils/
DRegionUtils.java42 public static void rectListToRegion(List<Rect> rects, Region outRegion) { in rectListToRegion() argument
44 final int n = rects.size(); in rectListToRegion()
46 outRegion.union(rects.get(i)); in rectListToRegion()
74 final ArrayList<Rect> rects = new ArrayList<>(); in forEachRectReverse() local
77 rects.add(new Rect(rect)); in forEachRectReverse()
81 Collections.reverse(rects); in forEachRectReverse()
82 rects.forEach(rectConsumer); in forEachRectReverse()
/frameworks/base/libs/hwui/pipeline/skia/
DSkiaProfileRenderer.cpp28 void SkiaProfileRenderer::drawRects(const float* rects, int count, const SkPaint& paint) { in drawRects() argument
30 SkRect rect = SkRect::MakeLTRB(rects[index + 0], rects[index + 1], rects[index + 2], in drawRects()
31 rects[index + 3]); in drawRects()
DSkiaProfileRenderer.h30 void drawRects(const float* rects, int count, const SkPaint& paint) override;
/frameworks/base/core/java/android/view/
DViewRootRectTracker.java97 final List<Rect> rects = new ArrayList<>(mRootRects); in computeChanges() local
105 rects.addAll(info.mRects); in computeChanges()
116 if (!mRects.equals(rects)) { in computeChanges()
117 mRects = rects; in computeChanges()
139 public void setRootRects(@NonNull List<Rect> rects) { in setRootRects() argument
140 Preconditions.checkNotNull(rects, "rects must not be null"); in setRootRects()
141 mRootRects = rects; in setRootRects()
152 final List<Rect> rects = mRectCollector.apply(v); in getTrackedRectsForView() local
153 return rects == null ? Collections.emptyList() : rects; in getTrackedRectsForView()
DWindowInsets.java580 final Rect[] rects = typeBoundingRectsMap[indexOf(i)]; in getBoundingRects() local
581 if (rects == null) { in getBoundingRects()
585 allRects = rects; in getBoundingRects()
587 final Rect[] concat = new Rect[allRects.length + rects.length]; in getBoundingRects()
589 System.arraycopy(rects, 0, concat, allRects.length, rects.length); in getBoundingRects()
1704 public Builder setBoundingRects(@InsetsType int typeMask, @NonNull List<Rect> rects) { in setBoundingRects() argument
1709 mTypeBoundingRectsMap[indexOf(i)] = rects.toArray(new Rect[0]); in setBoundingRects()
1729 @NonNull List<Rect> rects) { in setBoundingRectsIgnoringVisibility() argument
1737 mTypeMaxBoundingRectsMap[indexOf(i)] = rects.toArray(new Rect[0]); in setBoundingRectsIgnoringVisibility()
DDisplayCutout.java194 private Bounds(Rect[] rects, boolean copyArguments) { in Bounds() argument
195 if (rects.length != BOUNDS_POSITION_LENGTH) { in Bounds()
197 "rects must have exactly 4 elements: rects=" + Arrays.toString(rects)); in Bounds()
202 mRects[i] = new Rect(rects[i]); in Bounds()
205 for (Rect rect : rects) { in Bounds()
209 + Arrays.toString(rects)); in Bounds()
212 mRects = rects; in Bounds()
230 Rect[] rects = new Rect[BOUNDS_POSITION_LENGTH]; in getRects() local
232 rects[i] = new Rect(mRects[i]); in getRects()
234 return rects; in getRects()
/frameworks/av/services/camera/libcameraservice/device3/
DDistortionMapper.cpp352 status_t DistortionMapper::mapRawRectToCorrected(int32_t *rects, int rectCount, in mapRawRectToCorrected() argument
358 rects[i], in mapRawRectToCorrected()
359 rects[i + 1], in mapRawRectToCorrected()
360 rects[i] + rects[i + 2] - 1, in mapRawRectToCorrected()
361 rects[i + 1] + rects[i + 3] - 1 in mapRawRectToCorrected()
367 rects[i] = coords[0]; in mapRawRectToCorrected()
368 rects[i + 1] = coords[1]; in mapRawRectToCorrected()
369 rects[i + 2] = coords[2] - coords[0] + 1; in mapRawRectToCorrected()
370 rects[i + 3] = coords[3] - coords[1] + 1; in mapRawRectToCorrected()
438 status_t DistortionMapper::mapCorrectedRectToRaw(int32_t *rects, int rectCount, in mapCorrectedRectToRaw() argument
[all …]
DZoomRatioMapper.cpp476 void ZoomRatioMapper::scaleRects(int32_t* rects, int rectCount, in scaleRects() argument
482 rects[i], in scaleRects()
483 rects[i + 1], in scaleRects()
484 rects[i] + rects[i + 2] - 1, in scaleRects()
485 rects[i + 1] + rects[i + 3] - 1 in scaleRects()
494 rects[i] = coords[0]; in scaleRects()
495 rects[i + 1] = coords[1]; in scaleRects()
496 rects[i + 2] = coords[2] - coords[0] + 1; in scaleRects()
497 rects[i + 3] = coords[3] - coords[1] + 1; in scaleRects()
DDistortionMapper.h103 status_t mapRawRectToCorrected(int32_t *rects, int rectCount,
127 status_t mapCorrectedRectToRaw(int32_t *rects, int rectCount,
DZoomRatioMapper.h89 void scaleRects(int32_t* rects, int rectCount, float scaleRatio, int32_t arrayWidth,
/frameworks/base/libs/hwui/jni/
DRegion.cpp210 std::vector<int32_t> rects; in Region_createFromParcel() local
213 ndk::AParcel_readVector(p, &rects); in Region_createFromParcel()
216 if ((rects.size() % 4) != 0) { in Region_createFromParcel()
221 for (size_t x = 0; x + 4 <= rects.size(); x += 4) { in Region_createFromParcel()
222 region->op({rects[x], rects[x+1], rects[x+2], rects[x+3]}, SkRegion::kUnion_Op); in Region_createFromParcel()
239 std::vector<int32_t> rects; in Region_writeToParcel() local
243 rects.push_back(r.fLeft); in Region_writeToParcel()
244 rects.push_back(r.fTop); in Region_writeToParcel()
245 rects.push_back(r.fRight); in Region_writeToParcel()
246 rects.push_back(r.fBottom); in Region_writeToParcel()
[all …]
/frameworks/av/services/camera/libcameraservice/tests/
DDistortionMapperTest.cpp150 std::array<int32_t, 8> rects = { in TEST() local
155 auto rectsOrig = rects; in TEST()
156 res = m.mapCorrectedRectToRaw(rects.data(), 2, mapperInfo, /*clamp*/true); in TEST()
159 for (size_t i = 0; i < rects.size(); i++) { in TEST()
160 EXPECT_EQ(rects[i], rectsOrig[i]); in TEST()
163 res = m.mapRawRectToCorrected(rects.data(), 2, mapperInfo, /*clamp*/true); in TEST()
166 for (size_t i = 0; i < rects.size(); i++) { in TEST()
167 EXPECT_EQ(rects[i], rectsOrig[i]); in TEST()
/frameworks/native/libs/ui/
DRegion.cpp368 Rect* rects = mStorage.data(); in scaleSelf() local
370 rects->left = static_cast<int32_t>(static_cast<float>(rects->left) * sx + 0.5f); in scaleSelf()
371 rects->right = static_cast<int32_t>(static_cast<float>(rects->right) * sx + 0.5f); in scaleSelf()
372 rects->top = static_cast<int32_t>(static_cast<float>(rects->top) * sy + 0.5f); in scaleSelf()
373 rects->bottom = static_cast<int32_t>(static_cast<float>(rects->bottom) * sy + 0.5f); in scaleSelf()
374 rects++; in scaleSelf()
803 Rect* rects = reg.mStorage.data(); in translate() local
805 rects->offsetBy(dx, dy); in translate()
806 rects++; in translate()
/frameworks/base/core/java/com/android/internal/view/menu/
DIconMenuView.java454 final ArrayList<Rect> rects = mHorizontalDividerRects; in onDraw() local
455 for (int i = rects.size() - 1; i >= 0; i--) { in onDraw()
456 drawable.setBounds(rects.get(i)); in onDraw()
464 final ArrayList<Rect> rects = mVerticalDividerRects; in onDraw() local
465 for (int i = rects.size() - 1; i >= 0; i--) { in onDraw()
466 drawable.setBounds(rects.get(i)); in onDraw()
/frameworks/base/libs/hwui/
DIProfileRenderer.h26 virtual void drawRects(const float* rects, int count, const SkPaint& paint) = 0;
/frameworks/base/libs/hwui/renderthread/
DEglManager.cpp602 EGLint rects[4]; in damageFrame() local
603 frame.map(dirty, rects); in damageFrame()
604 if (!eglSetDamageRegionKHR(mEglDisplay, frame.mSurface, rects, 1)) { in damageFrame()
622 EGLint rects[4]; in swapBuffers() local
623 frame.map(screenDirty, rects); in swapBuffers()
624 eglSwapBuffersWithDamageKHR(mEglDisplay, frame.mSurface, rects, screenDirty.isEmpty() ? 0 : 1); in swapBuffers()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DDisplayCutoutBaseView.kt200 fun rectsToRegion(rects: List<Rect?>?): Region { in <lambda>()
202 if (rects != null) { in <lambda>()
203 for (r in rects) { in <lambda>()
/frameworks/native/libs/ui/tests/
DRect_test.cpp263 const std::vector<Rect> rects = { in TEST() local
268 for (const auto& a : rects) { in TEST()
269 for (const auto& b : rects) { in TEST()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/events/
DPrivacyDotViewController.kt589 val rects = getLayoutRects() in <lambda>() constant
593 seascapeRect = rects[0], in <lambda>()
594 portraitRect = rects[1], in <lambda>()
595 landscapeRect = rects[2], in <lambda>()
596 upsideDownRect = rects[3] in <lambda>()
/frameworks/native/opengl/include/EGL/
Deglext.h282 … PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
284 …APIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
446 …LSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
448 …RY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
921 …LSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
923 …RY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
1041 …APBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
1043 …eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
1049 …PBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
1051 …glSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
/frameworks/native/services/surfaceflinger/layerproto/
DLayerProtoParser.cpp130 region.rects.push_back(generateRect(rectProto)); in generateRegion()
275 static_cast<int>(rects.size())); in to_string()
277 for (auto& rect : rects) { in to_string()
/frameworks/native/opengl/tests/hwc/
DhwcColorEquiv.cpp365 layer->visibleRegionScreen.rects = &layer->displayFrame; in main()
379 layer->visibleRegionScreen.rects = &layer->displayFrame; in main()
/frameworks/native/opengl/libs/EGL/
DeglApi.cpp251 EGLBoolean eglSwapBuffersWithDamageKHR(EGLDisplay dpy, EGLSurface draw, EGLint* rects, in eglSwapBuffersWithDamageKHR() argument
257 return cnx->platform.eglSwapBuffersWithDamageKHR(dpy, draw, rects, n_rects); in eglSwapBuffersWithDamageKHR()
613 EGLBoolean eglSetDamageRegionKHR(EGLDisplay dpy, EGLSurface surface, EGLint* rects, in eglSetDamageRegionKHR() argument
618 return cnx->platform.eglSetDamageRegionKHR(dpy, surface, rects, n_rects); in eglSetDamageRegionKHR()

12