Home
last modified time | relevance | path

Searched refs:cropRect (Results 1 – 25 of 27) sorted by relevance

12

/frameworks/native/libs/gui/
DGLConsumerUtils.cpp28 const sp<GraphicBuffer>& buf, const Rect& cropRect, uint32_t transform, in computeTransformMatrix() argument
31 cropRect, transform, filtering); in computeTransformMatrix()
36 const Rect& cropRect, uint32_t transform, bool filtering) { in computeTransformMatrix() argument
68 if (!cropRect.isEmpty()) { in computeTransformMatrix()
100 if (cropRect.width() < bufferWidth) { in computeTransformMatrix()
101 tx = (float(cropRect.left) + shrinkAmount) / bufferWidth; in computeTransformMatrix()
102 sx = (float(cropRect.width()) - (2.0f * shrinkAmount)) / in computeTransformMatrix()
105 if (cropRect.height() < bufferHeight) { in computeTransformMatrix()
106 ty = (float(bufferHeight - cropRect.bottom) + shrinkAmount) / in computeTransformMatrix()
108 sy = (float(cropRect.height()) - (2.0f * shrinkAmount)) / in computeTransformMatrix()
/frameworks/base/packages/WallpaperCropper/src/com/android/wallpapercropper/
DWallpaperCropActivity.java368 RectF cropRect = mCropView.getCrop(); in cropImageAndSetWallpaper()
373 float cropScale = mCropView.getWidth() / (float) cropRect.width(); in cropImageAndSetWallpaper()
384 cropRect.left = Math.max(0, cropRect.left); in cropImageAndSetWallpaper()
385 cropRect.right = Math.min(rotatedInSize[0], cropRect.right); in cropImageAndSetWallpaper()
386 cropRect.top = Math.max(0, cropRect.top); in cropImageAndSetWallpaper()
387 cropRect.bottom = Math.min(rotatedInSize[1], cropRect.bottom); in cropImageAndSetWallpaper()
394 extraSpace = 2f * Math.min(rotatedInSize[0] - cropRect.right, cropRect.left); in cropImageAndSetWallpaper()
396 extraSpace = ltr ? rotatedInSize[0] - cropRect.right : cropRect.left; in cropImageAndSetWallpaper()
399 float maxExtraSpace = defaultWallpaperSize.x / cropScale - cropRect.width(); in cropImageAndSetWallpaper()
403 cropRect.left -= extraSpace / 2f; in cropImageAndSetWallpaper()
[all …]
/frameworks/base/media/java/android/media/
DImage.java359 public void setCropRect(Rect cropRect) { in setCropRect() argument
362 if (cropRect != null) { in setCropRect()
363 cropRect = new Rect(cropRect); // make a copy in setCropRect()
364 if (!cropRect.intersect(0, 0, getWidth(), getHeight())) { in setCropRect()
365 cropRect.setEmpty(); in setCropRect()
368 mCropRect = cropRect; in setCropRect()
DMediaCodec.java5859 public void setCropRect(@Nullable Rect cropRect) { in setCropRect() argument
5863 super.setCropRect(cropRect); in setCropRect()
5868 long timestamp, int xOffset, int yOffset, @Nullable Rect cropRect) { in MediaImage() argument
5970 if (cropRect == null) { in MediaImage()
5971 cropRect = new Rect(0, 0, mWidth, mHeight); in MediaImage()
5973 cropRect.offset(-xOffset, -yOffset); in MediaImage()
5974 super.setCropRect(cropRect); in MediaImage()
5980 long timestamp, int xOffset, int yOffset, @Nullable Rect cropRect, long context) { in MediaImage() argument
6002 if (cropRect == null) { in MediaImage()
6003 cropRect = new Rect(0, 0, mWidth, mHeight); in MediaImage()
[all …]
/frameworks/base/libs/hwui/
DReadback.cpp63 ARect cropRect; in copySurfaceInto() local
66 &cropRect, &windowTransform); in copySurfaceInto()
73 ALOGV("Using new path, cropRect=" RECT_STRING ", transform=%x", ARECT_ARGS(cropRect), in copySurfaceInto()
126 if (cropRect.left < cropRect.right && cropRect.top < cropRect.bottom) { in copySurfaceInto()
128 SkRect::MakeLTRB(cropRect.left, cropRect.top, cropRect.right, cropRect.bottom); in copySurfaceInto()
129 imageWH = SkISize::Make(cropRect.right - cropRect.left, cropRect.bottom - cropRect.top); in copySurfaceInto()
245 const bool hasBufferCrop = cropRect.left < cropRect.right && cropRect.top < cropRect.bottom; in copySurfaceInto()
/frameworks/base/libs/hwui/pipeline/skia/
DLayerDrawable.cpp80 static void adjustCropForYUV(uint32_t format, int bufferWidth, int bufferHeight, SkRect* cropRect) { in adjustCropForYUV() argument
97 if (cropRect->width() > 1 && cropRect->width() < bufferWidth) { in adjustCropForYUV()
98 cropRect->inset(shrinkAmount, 0); in adjustCropForYUV()
101 if (cropRect->height() > 1 && cropRect->height() < bufferHeight) { in adjustCropForYUV()
102 cropRect->inset(0, shrinkAmount); in adjustCropForYUV()
/frameworks/native/services/surfaceflinger/FrontEnd/
DLayerSnapshot.h31 RoundedCornerState(const FloatRect& cropRect, const vec2& radius) in RoundedCornerState()
32 : cropRect(cropRect), radius(radius) {} in RoundedCornerState()
35 FloatRect cropRect = FloatRect(); member
40 return cropRect == rhs.cropRect && radius == rhs.radius;
DLayerSnapshotBuilder.cpp934 parentRoundedCorner.cropRect = t.transform(parentRoundedCorner.cropRect); in updateRoundedCorner()
948 if (parentRoundedCorner.cropRect.left > layerCropRect.left && in updateRoundedCorner()
949 parentRoundedCorner.cropRect.top > layerCropRect.top && in updateRoundedCorner()
950 parentRoundedCorner.cropRect.right < layerCropRect.right && in updateRoundedCorner()
951 parentRoundedCorner.cropRect.bottom < layerCropRect.bottom) { in updateRoundedCorner()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/
DActivityEmbeddingAnimationAdapter.java157 final Rect cropRect = new Rect(mContentBounds); in onAnimationUpdateInner() local
158 cropRect.offset(positionX - mContentRelOffset.x, positionY - mContentRelOffset.y); in onAnimationUpdateInner()
161 final int offsetX = cropRect.left; in onAnimationUpdateInner()
162 final int offsetY = cropRect.top; in onAnimationUpdateInner()
165 if (!cropRect.intersect(mWholeAnimationBounds)) { in onAnimationUpdateInner()
171 cropRect.union(mContentBounds); in onAnimationUpdateInner()
175 cropRect.offset(-offsetX, -offsetY); in onAnimationUpdateInner()
176 t.setCrop(mLeash, cropRect); in onAnimationUpdateInner()
/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/
DTaskFragmentAnimationAdapter.java146 final Rect cropRect = new Rect(mContentBounds); in onAnimationUpdateInner() local
147 cropRect.offset(positionX - mContentRelOffset.x, positionY - mContentRelOffset.y); in onAnimationUpdateInner()
150 final int offsetX = cropRect.left; in onAnimationUpdateInner()
151 final int offsetY = cropRect.top; in onAnimationUpdateInner()
154 if (!cropRect.intersect(mWholeAnimationBounds)) { in onAnimationUpdateInner()
160 cropRect.offset(-offsetX, -offsetY); in onAnimationUpdateInner()
161 t.setCrop(mLeash, cropRect); in onAnimationUpdateInner()
/frameworks/base/graphics/java/android/graphics/drawable/
DAnimatedImageDrawable.java295 Rect cropRect, InputStream inputStream, AssetFileDescriptor afd) in AnimatedImageDrawable() argument
300 if (cropRect == null) { in AnimatedImageDrawable()
304 cropRect.set(Bitmap.scaleFromDensity(cropRect.left, srcDensity, dstDensity), in AnimatedImageDrawable()
305 Bitmap.scaleFromDensity(cropRect.top, srcDensity, dstDensity), in AnimatedImageDrawable()
306 Bitmap.scaleFromDensity(cropRect.right, srcDensity, dstDensity), in AnimatedImageDrawable()
307 Bitmap.scaleFromDensity(cropRect.bottom, srcDensity, dstDensity)); in AnimatedImageDrawable()
308 mIntrinsicWidth = cropRect.width(); in AnimatedImageDrawable()
309 mIntrinsicHeight = cropRect.height(); in AnimatedImageDrawable()
313 extended, cropRect), inputStream, afd); in AnimatedImageDrawable()
591 boolean extended, Rect cropRect) throws IOException; in nCreate() argument
/frameworks/native/libs/nativedisplay/surfacetexture/
DSurfaceTexture.cpp278 const Rect& cropRect, uint32_t transform, in computeTransformMatrix() argument
296 if (!cropRect.isEmpty() && buf.get()) { in computeTransformMatrix()
330 if (cropRect.width() < bufferWidth) { in computeTransformMatrix()
331 tx = (float(cropRect.left) + shrinkAmount) / bufferWidth; in computeTransformMatrix()
332 sx = (float(cropRect.width()) - (2.0f * shrinkAmount)) / bufferWidth; in computeTransformMatrix()
334 if (cropRect.height() < bufferHeight) { in computeTransformMatrix()
335 ty = (float(bufferHeight - cropRect.bottom) + shrinkAmount) / bufferHeight; in computeTransformMatrix()
336 sy = (float(cropRect.height()) - (2.0f * shrinkAmount)) / bufferHeight; in computeTransformMatrix()
/frameworks/base/media/jni/
Dandroid_media_ImageWriter.cpp686 android_native_rect_t cropRect; in ImageWriter_queueImage() local
687 cropRect.left = left; in ImageWriter_queueImage()
688 cropRect.top = top; in ImageWriter_queueImage()
689 cropRect.right = right; in ImageWriter_queueImage()
690 cropRect.bottom = bottom; in ImageWriter_queueImage()
691 res = native_window_set_crop(anw.get(), &cropRect); in ImageWriter_queueImage()
773 android_native_rect_t cropRect; in attachAndQeueuGraphicBuffer() local
774 cropRect.left = left; in attachAndQeueuGraphicBuffer()
775 cropRect.top = top; in attachAndQeueuGraphicBuffer()
776 cropRect.right = right; in attachAndQeueuGraphicBuffer()
[all …]
Dandroid_media_ImageReader.cpp820 Rect cropRect(cropLeft, cropTop, cropRight, cropBottom); in ImageReader_createImagePlanes() local
823 cropRect, fenceFd, &lockedImg); in ImageReader_createImagePlanes()
Dandroid_media_MediaCodec.cpp730 jobject cropRect = NULL; in getImage() local
740 cropRect = env->NewObject( in getImage()
755 (jint)0 /* xOffset */, (jint)0 /* yOffset */, cropRect); in getImage()
764 if (cropRect != NULL) { in getImage()
765 env->DeleteLocalRef(cropRect); in getImage()
766 cropRect = NULL; in getImage()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawable/
DCircleFramedDrawable.java67 final Rect cropRect = new Rect((width - square) / 2, (height - square) / 2, square, square); in CircleFramedDrawable() local
84 canvas.drawBitmap(icon, cropRect, circleRect, paint); in CircleFramedDrawable()
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DAndroidCamera2Settings.java573 RectF cropRect = new RectF(/*left*/0, /*top*/0, cropWidth, cropHeight); in effectiveCropRectFromRequested() local
577 translateMatrix.postTranslate(-cropRect.centerX(), -cropRect.centerY()); in effectiveCropRectFromRequested()
579 translateMatrix.mapRect(/*inout*/cropRect); in effectiveCropRectFromRequested()
583 cropRect.roundOut(result); in effectiveCropRectFromRequested()
/frameworks/native/libs/gui/include/gui/
DGLConsumer.h138 const sp<GraphicBuffer>& buf, const Rect& cropRect,
143 const Rect& cropRect, uint32_t transform, bool filtering);
/frameworks/base/core/java/android/app/
DWallpaperManager.java1226 RectF cropRect = new RectF(0, 0, crop.getWidth(), crop.getHeight()); in getBuiltInDrawable() local
1228 m.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); in getBuiltInDrawable()
1247 RectF cropRect = new RectF(); in getMaxCropRect() local
1250 cropRect.top = 0; in getMaxCropRect()
1251 cropRect.bottom = inHeight; in getMaxCropRect()
1253 cropRect.left = (inWidth - cropWidth) * horizontalAlignment; in getMaxCropRect()
1254 cropRect.right = cropRect.left + cropWidth; in getMaxCropRect()
1256 cropRect.left = 0; in getMaxCropRect()
1257 cropRect.right = inWidth; in getMaxCropRect()
1259 cropRect.top = (inHeight - cropHeight) * verticalAlignment; in getMaxCropRect()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/back/
DCrossActivityBackAnimation.kt76 private val cropRect = Rect() in <lambda>() constant in com.android.wm.shell.back.CrossActivityBackAnimation
200 cropRect.set( in <lambda>()
209 cropRect.set(backAnimRect) in <lambda>()
361 .setCrop(leash, cropRect) in <lambda>()
/frameworks/native/libs/nativedisplay/include/surfacetexture/
DSurfaceTexture.h154 const Rect& cropRect, uint32_t transform, bool filtering);
/frameworks/native/services/surfaceflinger/
DLayerFE.cpp141 layerSettings.geometry.roundedCornersCrop = roundedCornerState.cropRect; in prepareClientCompositionInternal()
DLayer.cpp2101 parentSettings.cropRect = t.transform(parentSettings.cropRect); in getRoundedCornerState()
2117 if (parentSettings.cropRect.left > layerCropRect.left && in getRoundedCornerState()
2118 parentSettings.cropRect.top > layerCropRect.top && in getRoundedCornerState()
2119 parentSettings.cropRect.right < layerCropRect.right && in getRoundedCornerState()
2120 parentSettings.cropRect.bottom < layerCropRect.bottom) { in getRoundedCornerState()
2243 LayerProtoHelper::writeToProto(getRoundedCornerState().cropRect, in writeToProtoDrawingState()
DLayerProtoHelper.cpp404 LayerProtoHelper::writeToProto(snapshot.roundedCorner.cropRect, in writeSnapshotToProto()
/frameworks/native/libs/renderengine/skia/
DSkiaRenderEngine.cpp178 const android::FloatRect& cropRect, in getBoundsAndClip() argument
181 const SkRect crop = getSkRect(cropRect); in getBoundsAndClip()

12