/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/ |
D | PipSnapAlgorithmTest.java | 57 final Rect bounds = new Rect(STACK_BOUNDS_CENTERED); in testApplySnapFraction_topEdge() local 59 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_topEdge() 61 assertEquals(MOVEMENT_BOUNDS.width() / 4, bounds.left); in testApplySnapFraction_topEdge() 62 assertEquals(MOVEMENT_BOUNDS.top, bounds.top); in testApplySnapFraction_topEdge() 68 final Rect bounds = new Rect(STACK_BOUNDS_CENTERED); in testApplySnapFraction_rightEdge() local 70 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_rightEdge() 72 assertEquals(MOVEMENT_BOUNDS.right, bounds.left); in testApplySnapFraction_rightEdge() 73 assertEquals(MOVEMENT_BOUNDS.height() / 2, bounds.top); in testApplySnapFraction_rightEdge() 79 final Rect bounds = new Rect(STACK_BOUNDS_CENTERED); in testApplySnapFraction_bottomEdge() local 81 mPipSnapAlgorithm.applySnapFraction(bounds, MOVEMENT_BOUNDS, snapFraction); in testApplySnapFraction_bottomEdge() [all …]
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | DockedDividerUtils.java | 63 public static void sanitizeStackBounds(Rect bounds, boolean topLeft) { in sanitizeStackBounds() argument 69 if (bounds.left >= bounds.right) { in sanitizeStackBounds() 70 bounds.left = bounds.right - 1; in sanitizeStackBounds() 72 if (bounds.top >= bounds.bottom) { in sanitizeStackBounds() 73 bounds.top = bounds.bottom - 1; in sanitizeStackBounds() 76 if (bounds.right <= bounds.left) { in sanitizeStackBounds() 77 bounds.right = bounds.left + 1; in sanitizeStackBounds() 79 if (bounds.bottom <= bounds.top) { in sanitizeStackBounds() 80 bounds.bottom = bounds.top + 1; in sanitizeStackBounds() 85 public static int calculatePositionForBounds(Rect bounds, int dockSide, int dividerSize) { in calculatePositionForBounds() argument [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ |
D | ActivityEmbeddingAnimationSpec.java | 85 final Rect bounds = change.getEndAbsBounds(); in createChangeBoundsOpenAnimation() local 88 if (parentBounds.top == bounds.top && parentBounds.bottom == bounds.bottom) { in createChangeBoundsOpenAnimation() 91 startLeft = parentBounds.left == bounds.left ? -bounds.width() : bounds.width(); in createChangeBoundsOpenAnimation() 94 startTop = parentBounds.top == bounds.top ? -bounds.height() : bounds.height(); in createChangeBoundsOpenAnimation() 103 animation.initialize(bounds.width(), bounds.height(), bounds.width(), bounds.height()); in createChangeBoundsOpenAnimation() 113 final Rect bounds = change.getStartAbsBounds(); in createChangeBoundsCloseAnimation() local 116 if (parentBounds.top == bounds.top && parentBounds.bottom == bounds.bottom) { in createChangeBoundsCloseAnimation() 119 endLeft = parentBounds.left == bounds.left ? -bounds.width() : bounds.width(); in createChangeBoundsCloseAnimation() 122 endTop = parentBounds.top == bounds.top ? -bounds.height() : bounds.height(); in createChangeBoundsCloseAnimation() 131 animation.initialize(bounds.width(), bounds.height(), bounds.width(), bounds.height()); in createChangeBoundsCloseAnimation()
|
/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/ |
D | CommonAssertions.kt | 200 0, 0, displayBounds.bounds.right, in getPrimaryRegion() 201 dividerRegion.bounds.top + WindowUtils.dockedStackDividerInset in getPrimaryRegion() 205 0, 0, dividerRegion.bounds.left + WindowUtils.dockedStackDividerInset, in getPrimaryRegion() 206 displayBounds.bounds.bottom in getPrimaryRegion() 215 0, dividerRegion.bounds.bottom - WindowUtils.dockedStackDividerInset, in getSecondaryRegion() 216 displayBounds.bounds.right, displayBounds.bounds.bottom in getSecondaryRegion() 220 dividerRegion.bounds.right - WindowUtils.dockedStackDividerInset, 0, in getSecondaryRegion() 221 displayBounds.bounds.right, displayBounds.bounds.bottom in getSecondaryRegion() 229 Region.from(0, 0, dividerRegion.bounds.left, displayBounds.bounds.bottom) in getSplitLeftTopRegion() 231 Region.from(0, 0, displayBounds.bounds.right, dividerRegion.bounds.top) in getSplitLeftTopRegion() [all …]
|
/frameworks/base/libs/hwui/canvas/ |
D | CanvasFrontend.cpp | 36 clip().bounds = mInitialBounds; in resetState() 52 const SkRect& bounds, bool aa, bool fillsBounds) { in apply() argument 57 bool rect = matrix.mapRect(&devBounds, bounds) && fillsBounds; in apply() 58 if (!this->bounds.intersect(aa ? devBounds.roundOut() : devBounds.round())) { in apply() 59 this->bounds.setEmpty(); in apply() 74 SkRect bounds = path.getBounds(); in internalClipPath() local 79 clip().apply(op, transform(), bounds, /*aa=*/true, /*fillsBounds=*/false); in internalClipPath() 110 SkIRect bounds = clip().bounds; in getClipBounds() local 114 if (bounds.isEmpty() || !transform().invert(&inverse)) { in getClipBounds() 118 return inverse.mapRect(SkRect::Make(bounds)); in getClipBounds() [all …]
|
/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/ |
D | TaskFragmentAnimationSpec.java | 90 final Rect bounds = target.screenSpaceBounds; in createChangeBoundsOpenAnimation() local 93 if (parentBounds.top == bounds.top && parentBounds.bottom == bounds.bottom) { in createChangeBoundsOpenAnimation() 96 startLeft = parentBounds.left == bounds.left ? -bounds.width() : bounds.width(); in createChangeBoundsOpenAnimation() 99 startTop = parentBounds.top == bounds.top ? -bounds.height() : bounds.height(); in createChangeBoundsOpenAnimation() 108 animation.initialize(bounds.width(), bounds.height(), bounds.width(), bounds.height()); in createChangeBoundsOpenAnimation() 118 final Rect bounds = target.startBounds; in createChangeBoundsCloseAnimation() local 121 if (parentBounds.top == bounds.top && parentBounds.bottom == bounds.bottom) { in createChangeBoundsCloseAnimation() 124 endLeft = parentBounds.left == bounds.left ? -bounds.width() : bounds.width(); in createChangeBoundsCloseAnimation() 127 endTop = parentBounds.top == bounds.top ? -bounds.height() : bounds.height(); in createChangeBoundsCloseAnimation() 136 animation.initialize(bounds.width(), bounds.height(), bounds.width(), bounds.height()); in createChangeBoundsCloseAnimation()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | StatusBarContentInsetsProviderTest.kt | 82 var bounds = calculateInsetsForRotationWithRotatedResources( in testGetBoundingRectForPrivacyChipForRotation_noCutout() variable 93 var chipBounds = getPrivacyChipBoundingRectForInsets(bounds, dotWidth, chipWidth, isRtl) in testGetBoundingRectForPrivacyChipForRotation_noCutout() 102 chipBounds = getPrivacyChipBoundingRectForInsets(bounds, dotWidth, chipWidth, isRtl) in testGetBoundingRectForPrivacyChipForRotation_noCutout() 113 bounds = calculateInsetsForRotationWithRotatedResources( in testGetBoundingRectForPrivacyChipForRotation_noCutout() 124 chipBounds = getPrivacyChipBoundingRectForInsets(bounds, dotWidth, chipWidth, isRtl) in testGetBoundingRectForPrivacyChipForRotation_noCutout() 133 chipBounds = getPrivacyChipBoundingRectForInsets(bounds, dotWidth, chipWidth, isRtl) in testGetBoundingRectForPrivacyChipForRotation_noCutout() 166 var bounds = calculateInsetsForRotationWithRotatedResources( in testCalculateInsetsForRotationWithRotatedResources_topLeftCutout() variable 177 assertRects(expectedBounds, bounds, currentRotation, targetRotation) in testCalculateInsetsForRotationWithRotatedResources_topLeftCutout() 185 bounds = calculateInsetsForRotationWithRotatedResources( in testCalculateInsetsForRotationWithRotatedResources_topLeftCutout() 196 assertRects(expectedBounds, bounds, currentRotation, targetRotation) in testCalculateInsetsForRotationWithRotatedResources_topLeftCutout() [all …]
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | ConfigurationContainer.java | 269 public boolean equivalentRequestedOverrideBounds(Rect bounds) { in equivalentRequestedOverrideBounds() argument 270 return equivalentBounds(getRequestedOverrideBounds(), bounds); in equivalentRequestedOverrideBounds() 274 public boolean equivalentRequestedOverrideMaxBounds(Rect bounds) { in equivalentRequestedOverrideMaxBounds() argument 275 return equivalentBounds(getRequestedOverrideMaxBounds(), bounds); in equivalentRequestedOverrideMaxBounds() 281 public static boolean equivalentBounds(Rect bounds, Rect other) { in equivalentBounds() argument 282 return bounds == other in equivalentBounds() 283 || (bounds != null && (bounds.equals(other) || (bounds.isEmpty() && other == null))) in equivalentBounds() 284 || (other != null && other.isEmpty() && bounds == null); in equivalentBounds() 310 Rect bounds = getBounds(); in getPosition() local 311 out.set(bounds.left, bounds.top); in getPosition() [all …]
|
D | SurfaceAnimationRunner.java | 364 private void edgeExtendWindow(SurfaceControl leash, Rect bounds, Animation a, in edgeExtendWindow() argument 376 final int targetSurfaceHeight = bounds.height(); in edgeExtendWindow() 377 final int targetSurfaceWidth = bounds.width(); in edgeExtendWindow() 380 final Rect edgeBounds = new Rect(bounds.left, bounds.top, bounds.left + 1, in edgeExtendWindow() 381 bounds.bottom); in edgeExtendWindow() 384 final int xPos = bounds.left + maxExtensionInsets.left; in edgeExtendWindow() 385 final int yPos = bounds.top; in edgeExtendWindow() 391 final Rect edgeBounds = new Rect(bounds.left, bounds.top, targetSurfaceWidth, in edgeExtendWindow() 392 bounds.top + 1); in edgeExtendWindow() 395 final int xPos = bounds.left; in edgeExtendWindow() [all …]
|
/frameworks/av/media/libstagefright/renderfright/gl/ |
D | GLSkiaShadowPort.cpp | 239 const FloatRect& bounds = args.fDevBounds; in fillInCircleVerts() local 244 vec2 center = vec2(bounds.getWidth() / 2.0f, bounds.getHeight() / 2.0f); in fillInCircleVerts() 245 float halfWidth = 0.5f * bounds.getWidth(); in fillInCircleVerts() 351 const FloatRect& bounds = args.fDevBounds; in fillInRRectVerts() local 354 float minDim = 0.5f * std::min(bounds.getWidth(), bounds.getHeight()); in fillInRRectVerts() 359 float xInner[4] = {bounds.left + umbraInset, bounds.right - umbraInset, in fillInRRectVerts() 360 bounds.left + umbraInset, bounds.right - umbraInset}; in fillInRRectVerts() 361 float xMid[4] = {bounds.left + outerRadius, bounds.right - outerRadius, in fillInRRectVerts() 362 bounds.left + outerRadius, bounds.right - outerRadius}; in fillInRRectVerts() 363 float xOuter[4] = {bounds.left, bounds.right, bounds.left, bounds.right}; in fillInRRectVerts() [all …]
|
/frameworks/native/libs/renderengine/gl/ |
D | GLSkiaShadowPort.cpp | 239 const FloatRect& bounds = args.fDevBounds; in fillInCircleVerts() local 244 vec2 center = vec2(bounds.getWidth() / 2.0f, bounds.getHeight() / 2.0f); in fillInCircleVerts() 245 float halfWidth = 0.5f * bounds.getWidth(); in fillInCircleVerts() 351 const FloatRect& bounds = args.fDevBounds; in fillInRRectVerts() local 354 float minDim = 0.5f * std::min(bounds.getWidth(), bounds.getHeight()); in fillInRRectVerts() 359 float xInner[4] = {bounds.left + umbraInset, bounds.right - umbraInset, in fillInRRectVerts() 360 bounds.left + umbraInset, bounds.right - umbraInset}; in fillInRRectVerts() 361 float xMid[4] = {bounds.left + outerRadius, bounds.right - outerRadius, in fillInRRectVerts() 362 bounds.left + outerRadius, bounds.right - outerRadius}; in fillInRRectVerts() 363 float xOuter[4] = {bounds.left, bounds.right, bounds.left, bounds.right}; in fillInRRectVerts() [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | SaveLayer2Animation.cpp | 37 SkIRect bounds = SkIRect::MakeWH(width, height); in createContent() local 39 int smallRectHeight = (bounds.height() / regions); in createContent() 41 int top = bounds.fTop; in createContent() 50 canvas.saveLayer(bounds.fLeft, top, bounds.fRight, top + padding, &mBluePaint); in createContent() 54 TestUtils::drawUtf8ToCanvas(&canvas, offscreen.c_str(), mBluePaint, bounds.fLeft, in createContent() 58 canvas.drawRect(bounds.fLeft, top + padding, bounds.fRight, in createContent() 61 TestUtils::drawUtf8ToCanvas(&canvas, onscreen.c_str(), mGreenPaint, bounds.fLeft, in createContent()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/ |
D | TvPipKeepClearAlgorithm.kt | 57 val bounds: Rect, in <lambda>() constant in com.android.wm.shell.pip.tv.TvPipKeepClearAlgorithm.Placement 64 fun getUnstashedBounds() = unstashDestinationBounds ?: bounds in <lambda>() 129 val pipBounds = removePermanentDecors(fromTransformedSpace(result.bounds)) in <lambda>() 342 private fun getNearbyStashedPosition(bounds: Rect, keepClearAreas: Set<Rect>): Rect { in <lambda>() 345 val areasOverlappingPipX = keepClearAreas.filter { it.intersectsX(bounds) } in <lambda>() 346 val areasOverlappingPipY = keepClearAreas.filter { it.intersectsY(bounds) } in <lambda>() 349 if (screenBounds.bottom - bounds.bottom <= bounds.top - screenBounds.top) { in <lambda>() 356 if (newTop > bounds.top) { in <lambda>() 357 val downPosition = Rect(bounds) in <lambda>() 358 downPosition.offsetTo(bounds.left, newTop) in <lambda>() [all …]
|
/frameworks/base/tests/UiBench/src/com/android/test/uibench/ |
D | SaveLayerInterleaveActivity.java | 59 Rect bounds = getBounds(); in onCreate() 61 int smallRectHeight = (bounds.height()/regions); in onCreate() 63 int top = bounds.top; in onCreate() 71 canvas.saveLayer(bounds.left, top, bounds.right, top + padding, in onCreate() 74 canvas.drawText("offscreen line "+ i, bounds.left, top + padding, in onCreate() 78 Rect partX = new Rect(bounds.left, top + padding, in onCreate() 79 bounds.right,top + smallRectHeight - padding); in onCreate() 81 canvas.drawText("onscreen line "+ i, bounds.left, in onCreate()
|
/frameworks/base/core/java/android/view/animation/ |
D | Transformation.java | 130 Rect bounds = t.getClipRect(); in compose() local 132 setClipRect(mClipRect.left + bounds.left, mClipRect.top + bounds.top, in compose() 133 mClipRect.right + bounds.right, mClipRect.bottom + bounds.bottom); in compose() 135 setClipRect(bounds); in compose() 150 Rect bounds = t.getClipRect(); in postCompose() local 152 setClipRect(mClipRect.left + bounds.left, mClipRect.top + bounds.top, in postCompose() 153 mClipRect.right + bounds.right, mClipRect.bottom + bounds.bottom); in postCompose() 155 setClipRect(bounds); in postCompose()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/ |
D | RoundedCornerProgressDrawable.kt | 50 override fun onBoundsChange(bounds: Rect) { in onBoundsChange() 51 super.onBoundsChange(bounds) in onBoundsChange() 56 val db = drawable?.bounds!! in onLevelChange() 58 val width = bounds.height() + (bounds.width() - bounds.height()) * level / MAX_LEVEL in onLevelChange() 59 drawable?.setBounds(bounds.left, db.top, bounds.left + width, db.bottom) in onLevelChange()
|
D | BrightnessProgressDrawable.kt | 53 override fun onBoundsChange(bounds: Rect) { in onBoundsChange() 54 super.onBoundsChange(bounds) in onBoundsChange() 59 val db = drawable?.bounds!! in onLevelChange() 62 val thumbOffset = bounds.height() / 2 in onLevelChange() 63 val width = bounds.width() * level / MAX_LEVEL + thumbOffset in onLevelChange() 67 bounds.left, in onLevelChange() 69 width.coerceAtMost(bounds.width()).coerceAtLeast(bounds.height()), in onLevelChange()
|
/frameworks/base/core/java/android/transition/ |
D | Explode.java | 85 Rect bounds = (Rect) endValues.values.get(PROPNAME_SCREEN_BOUNDS); in onAppear() local 88 calculateOut(sceneRoot, bounds, mTempLoc); in onAppear() 92 return TranslationAnimationCreator.createAnimation(view, endValues, bounds.left, bounds.top, in onAppear() 102 Rect bounds = (Rect) startValues.values.get(PROPNAME_SCREEN_BOUNDS); in onDisappear() local 103 int viewPosX = bounds.left; in onDisappear() 104 int viewPosY = bounds.top; in onDisappear() 113 endX += interruptedPosition[0] - bounds.left; in onDisappear() 114 endY += interruptedPosition[1] - bounds.top; in onDisappear() 115 bounds.offsetTo(interruptedPosition[0], interruptedPosition[1]); in onDisappear() 117 calculateOut(sceneRoot, bounds, mTempLoc); in onDisappear() [all …]
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | RippleComponent.java | 40 public RippleComponent(RippleDrawable owner, Rect bounds) { in RippleComponent() argument 42 mBounds = bounds; in RippleComponent() 65 private static float getTargetRadius(Rect bounds) { in getTargetRadius() argument 66 final float halfWidth = bounds.width() / 2.0f; in getTargetRadius() 67 final float halfHeight = bounds.height() / 2.0f; in getTargetRadius() 78 public void getBounds(Rect bounds) { in getBounds() argument 80 bounds.set(-r, -r, r, r); in getBounds()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | HardwareBgDrawable.java | 80 Rect bounds = getBounds(); in draw() local 81 int top = bounds.top + mPoint; in draw() 82 if (top > bounds.bottom) top = bounds.bottom; in draw() 84 mLayers[0].setBounds(bounds.left, bounds.top, bounds.right, top); in draw() 86 mLayers[1].setBounds(bounds.left, top, bounds.right, bounds.bottom); in draw()
|
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/ |
D | ShadowGenerator.java | 102 public static float getScaleForBounds(RectF bounds) { in getScaleForBounds() argument 107 float minSide = Math.min(Math.min(bounds.left, bounds.right), bounds.top); in getScaleForBounds() 113 if (bounds.bottom < bottomSpace) { in getScaleForBounds() 115 (HALF_DISTANCE - bottomSpace) / (HALF_DISTANCE - bounds.bottom)); in getScaleForBounds() 123 public final RectF bounds = new RectF(); field in ShadowGenerator.Builder 159 bounds.set(0, 0, width, height); in createPill() 160 bounds.offsetTo(center - width / 2f, center - height / 2f); in createPill() 174 c.drawRoundRect(bounds, radius, radius, p); in drawShadow() 179 c.drawRoundRect(bounds, radius, radius, p); in drawShadow() 187 c.drawRoundRect(bounds, radius, radius, p); in drawShadow() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/common/ui/drawable/ |
D | CircularDrawable.kt | 33 override fun onBoundsChange(bounds: Rect) { in onBoundsChange() 34 super.onBoundsChange(bounds) in onBoundsChange() 48 bounds.centerX().toFloat(), in updateClipPath() 49 bounds.centerY().toFloat(), in updateClipPath() 50 min(bounds.width(), bounds.height()) / 2f, in updateClipPath()
|
/frameworks/base/libs/hwui/pipeline/skia/ |
D | SkiaDisplayList.cpp | 68 static bool intersects(const SkISize screenSize, const Matrix4& mat, const SkRect& bounds) { in intersects() argument 69 Vector3 points[] = { Vector3 {bounds.fLeft, bounds.fTop, 0}, in intersects() 70 Vector3 {bounds.fRight, bounds.fTop, 0}, in intersects() 71 Vector3 {bounds.fRight, bounds.fBottom, 0}, in intersects() 72 Vector3 {bounds.fLeft, bounds.fBottom, 0}}; in intersects() 156 const SkRect& bounds = vectorDrawable->properties().getBounds(); in prepareListAndChildren() local 157 if (intersects(info.screenSize, totalMatrix, bounds)) { in prepareListAndChildren()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | ConfigurationContainerTests.java | 347 final Rect bounds = new Rect(0, 0, 10, 10); in testSetMaxBoundsByHierarchy() local 351 root.setBounds(bounds); in testSetMaxBoundsByHierarchy() 353 assertEquals(bounds, root.getBounds()); in testSetMaxBoundsByHierarchy() 354 assertEquals(bounds, root.getConfiguration().windowConfiguration.getBounds()); in testSetMaxBoundsByHierarchy() 355 assertEquals(bounds, child.getBounds()); in testSetMaxBoundsByHierarchy() 356 assertEquals(bounds, child.getConfiguration().windowConfiguration.getBounds()); in testSetMaxBoundsByHierarchy() 358 assertEquals(bounds, root.getMaxBounds()); in testSetMaxBoundsByHierarchy() 359 assertEquals(bounds, root.getConfiguration().windowConfiguration.getMaxBounds()); in testSetMaxBoundsByHierarchy() 360 assertEquals(bounds, child.getMaxBounds()); in testSetMaxBoundsByHierarchy() 361 assertEquals(bounds, child.getConfiguration().windowConfiguration.getMaxBounds()); in testSetMaxBoundsByHierarchy() [all …]
|
/frameworks/base/core/java/android/view/inputmethod/ |
D | EditorBoundsInfo.java | 91 EditorBoundsInfo bounds; in equals() local 93 bounds = (EditorBoundsInfo) obj; in equals() 97 return Objects.equals(bounds.mEditorBounds, mEditorBounds) in equals() 98 && Objects.equals(bounds.mHandwritingBounds, mHandwritingBounds); in equals() 142 public EditorBoundsInfo.Builder setEditorBounds(@Nullable RectF bounds) { in setEditorBounds() argument 143 mEditorBounds = bounds; in setEditorBounds() 153 public EditorBoundsInfo.Builder setHandwritingBounds(@Nullable RectF bounds) { in setHandwritingBounds() argument 154 mHandwritingBounds = bounds; in setHandwritingBounds()
|