Home
last modified time | relevance | path

Searched refs:crop (Results 1 – 25 of 138) sorted by relevance

123456

/frameworks/native/opengl/tests/finish/
Dfinish.cpp105 GLint crop[4] = { 0, 512, 512, -512 }; in main() local
106 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); in main()
119 GLint crop[4] = { 0, 1, 1, -1 }; in main() local
120 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); in main()
133 GLint crop[4] = { 0, 512, 512, -512 }; in main() local
134 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); in main()
148 GLint crop[4] = { 0, 1, 1, -1 }; in main() local
149 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); in main()
165 GLint crop[4] = { 0, 512, 512, -512 }; in main() local
166 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); in main()
[all …]
/frameworks/native/services/surfaceflinger/
DRenderAreaBuilder.h31 Rect crop; member
42 RenderAreaBuilder(Rect crop, ui::Size reqSize, ui::Dataspace reqDataSpace, in RenderAreaBuilder()
44 : crop(crop), reqSize(reqSize), reqDataSpace(reqDataSpace), options(options) {} in RenderAreaBuilder()
50 DisplayRenderAreaBuilder(Rect crop, ui::Size reqSize, ui::Dataspace reqDataSpace, in DisplayRenderAreaBuilder()
53 : RenderAreaBuilder(crop, reqSize, reqDataSpace, options), displayWeak(displayWeak) {} in DisplayRenderAreaBuilder()
59 return DisplayRenderArea::create(displayWeak, crop, reqSize, reqDataSpace, options); in build()
64 LayerRenderAreaBuilder(Rect crop, ui::Size reqSize, ui::Dataspace reqDataSpace, sp<Layer> layer, in LayerRenderAreaBuilder()
66 : RenderAreaBuilder(crop, reqSize, reqDataSpace, options), in LayerRenderAreaBuilder()
96 return std::make_unique<LayerRenderArea>(layer, std::move(layerSnapshot), crop, reqSize, in build()
DLayerRenderArea.cpp29 const Rect& crop, ui::Size reqSize, ui::Dataspace reqDataSpace, in LayerRenderArea() argument
36 mCrop(crop), in LayerRenderArea()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/wallpaper/
DWallpaperCropperTest.java159 Rect crop = new Rect(0, 0, bitmapSize.x, bitmapSize.y); in testNoParallax_noScale() local
160 assertThat(WallpaperCropper.noParallax(crop, displaySize, bitmapSize, /* rtl */ false)) in testNoParallax_noScale()
161 .isEqualTo(leftOf(crop, expectedCropSize)); in testNoParallax_noScale()
162 assertThat(WallpaperCropper.noParallax(crop, displaySize, bitmapSize, /* rtl */ true)) in testNoParallax_noScale()
163 .isEqualTo(rightOf(crop, expectedCropSize)); in testNoParallax_noScale()
173 Rect crop = new Rect(0, 0, bitmapSize.x, bitmapSize.y); in testNoParallax_withScale() local
175 assertThat(WallpaperCropper.noParallax(crop, displaySize, bitmapSize, /* rtl */ false)) in testNoParallax_withScale()
176 .isEqualTo(leftOf(crop, expectedCropSize)); in testNoParallax_withScale()
177 assertThat(WallpaperCropper.noParallax(crop, displaySize, bitmapSize, /* rtl */ true)) in testNoParallax_withScale()
178 .isEqualTo(rightOf(crop, expectedCropSize)); in testNoParallax_withScale()
[all …]
/frameworks/base/services/core/java/com/android/server/wallpaper/
DWallpaperCropper.java130 Rect crop = new Rect(0, 0, bitmapSize.x, bitmapSize.y); in getCrop() local
138 newSuggestedCrops.put(unfoldedOrientation, crop); in getCrop()
153 crop = getAdjustedCrop(landscapeCrop, bitmapSize, displaySize, false, rtl, ADD); in getCrop()
157 crop.left = landscapeCrop.left; in getCrop()
159 crop.right = landscapeCrop.right; in getCrop()
163 return getAdjustedCrop(crop, bitmapSize, displaySize, true, rtl, ADD); in getCrop()
256 static Rect noParallax(Rect crop, Point displaySize, Point bitmapSize, boolean rtl) { in noParallax() argument
257 if (displaySize == null) return crop; in noParallax()
258 Rect adjustedCrop = getAdjustedCrop(crop, bitmapSize, displaySize, true, rtl, ADD); in noParallax()
284 static Rect getAdjustedCrop(Rect crop, Point bitmapSize, Point screenSize, in getAdjustedCrop() argument
[all …]
/frameworks/av/media/codec2/core/include/
DC2Buffer.h1726 inline constexpr _C2PlanarSectionAspect(uint32_t width, uint32_t height, const C2Rect &crop) in _C2PlanarSectionAspect() argument
1728 mCrop(C2Rect(std::min(width - std::min(crop.left, width), crop.width), in _C2PlanarSectionAspect()
1729 std::min(height - std::min(crop.top, height), crop.height)).at( in _C2PlanarSectionAspect()
1730 std::min(crop.left, width), in _C2PlanarSectionAspect()
1731 std::min(crop.height, height))) { in _C2PlanarSectionAspect()
1737 inline constexpr C2Rect crop() const { return mCrop; } in crop() function
1742 inline constexpr _C2PlanarSectionAspect childSection(const C2Rect &crop) const { in childSection() argument
1746 C2Rect(c2_min(mCrop.right() - c2_clamp(mCrop.left, crop.left, mCrop.right()), in childSection()
1747 crop.width), in childSection()
1748 c2_min(mCrop.bottom() - c2_clamp(mCrop.top, crop.top, mCrop.bottom()), in childSection()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/
DScreenshotUtils.java38 public static void captureLayer(SurfaceControl sc, Rect crop, in captureLayer() argument
42 .setSourceCrop(crop) in captureLayer()
97 Rect crop, int layer) { in takeScreenshot() argument
98 return takeScreenshot(t, sc, sc /* parentSc */, crop, layer); in takeScreenshot()
113 SurfaceControl parentSc, Rect crop, int layer) { in takeScreenshot() argument
115 captureLayer(sc, crop, consumer); in takeScreenshot()
/frameworks/base/libs/hwui/hwui/
DImageDecoder.cpp143 bool ImageDecoder::setCropRect(const SkIRect* crop) { in setCropRect() argument
144 if (!crop) { in setCropRect()
149 if (crop->left() >= crop->right() || crop->top() >= crop->bottom()) { in setCropRect()
154 if (crop->left() < 0 || crop->top() < 0 in setCropRect()
155 || crop->right() > size.width() || crop->bottom() > size.height()) { in setCropRect()
159 mCropRect.emplace(*crop); in setCropRect()
536 SkIRect crop = *mCropRect; in extractGainmap() local
538 crop.fLeft *= sX; in extractGainmap()
539 crop.fRight *= sX; in extractGainmap()
540 crop.fTop *= sY; in extractGainmap()
[all …]
/frameworks/base/media/java/android/media/
DImageWriter.java527 Rect crop = image.getCropRect(); in queueInputImage() local
529 crop.left, crop.top, crop.right, crop.bottom, image.getTransform(), in queueInputImage()
758 Rect crop = image.getCropRect(); in attachAndQueueInputImage() local
763 crop.left, crop.top, crop.right, crop.bottom, image.getTransform(), in attachAndQueueInputImage()
768 image.getTimestamp(), image.getDataSpace(), crop.left, crop.top, crop.right, in attachAndQueueInputImage()
769 crop.bottom, image.getTransform(), image.getScalingMode()); in attachAndQueueInputImage()
/frameworks/av/media/libstagefright/colorconversion/
DSoftwareRenderer.cpp221 android_native_rect_t crop; in resetFormatIfChanged() local
222 crop.left = mCropLeft; in resetFormatIfChanged()
223 crop.top = mCropTop; in resetFormatIfChanged()
224 crop.right = mCropRight + 1; in resetFormatIfChanged()
225 crop.bottom = mCropBottom + 1; in resetFormatIfChanged()
227 crop.left, crop.top, crop.right, crop.bottom, bufWidth, bufHeight); in resetFormatIfChanged()
229 CHECK_EQ(0, native_window_set_crop(mNativeWindow.get(), &crop)); in resetFormatIfChanged()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/
DFakeImageCapture.kt29 override fun captureDisplay(displayId: Int, crop: Rect?): Bitmap? { in captureDisplay()
31 requestedDisplayCrop = crop in captureDisplay()
/frameworks/base/packages/WallpaperBackup/src/com/android/wallpaperbackup/
DWallpaperBackupAgent.java725 Rect withoutParallax(Rect crop, Point displaySize, boolean rtl, Point bitmapSize) { in withoutParallax() argument
727 if (crop.isEmpty()) { in withoutParallax()
728 crop = new Rect(0, 0, bitmapSize.x, bitmapSize.y); in withoutParallax()
732 Slog.w(TAG, "- crop: " + crop); in withoutParallax()
735 Rect adjustedCrop = new Rect(crop); in withoutParallax()
741 int wallpaperWidthWithoutParallax = (int) (0.5f + (float) displaySize.x * crop.height() in withoutParallax()
745 int widthToRemove = Math.max(0, crop.width() - wallpaperWidthWithoutParallax); in withoutParallax()
760 Slog.d(TAG, "- adjustedCrop: " + crop); in withoutParallax()
776 Rect sameCenter(Point displaySize, Point bitmapSize, Rect crop) { in sameCenter() argument
779 if (crop.isEmpty()) { in sameCenter()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/
DPipSurfaceTransactionHelper.java71 public PipSurfaceTransactionHelper crop(SurfaceControl.Transaction tx, SurfaceControl leash, in crop() method in PipSurfaceTransactionHelper
185 final Rect crop = mTmpDestinationRect; in rotateAndScaleWithCrop() local
186 crop.set(0, 0, Transitions.SHELL_TRANSITIONS_ROTATION ? destH in rotateAndScaleWithCrop()
189 crop.scale(1 / scale); in rotateAndScaleWithCrop()
190 crop.offset(insets.left, insets.top); in rotateAndScaleWithCrop()
208 tx.setMatrix(leash, mTmpTransform, mTmpFloat9).setCrop(leash, crop); in rotateAndScaleWithCrop()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/
DPipSurfaceTransactionHelper.java71 public PipSurfaceTransactionHelper crop(SurfaceControl.Transaction tx, SurfaceControl leash, in crop() method in PipSurfaceTransactionHelper
182 final Rect crop = mTmpDestinationRect; in rotateAndScaleWithCrop() local
183 crop.set(0, 0, Transitions.SHELL_TRANSITIONS_ROTATION ? destH in rotateAndScaleWithCrop()
186 crop.scale(1 / scale); in rotateAndScaleWithCrop()
187 crop.offset(insets.left, insets.top); in rotateAndScaleWithCrop()
205 tx.setMatrix(leash, mTmpTransform, mTmpFloat9).setCrop(leash, crop); in rotateAndScaleWithCrop()
/frameworks/base/packages/WallpaperCropper/src/com/android/wallpapercropper/
DWallpaperCropActivity.java335 RectF crop = getMaxCropRect( in cropImageAndSetWallpaper() local
346 crop, rotation, outSize.x, outSize.y, true, false, onEndCrop); in cropImageAndSetWallpaper()
653 Bitmap crop = null; local
660 crop = decoder.decodeRegion(roundedTrueCrop, options);
664 if (crop == null) {
709 crop = Bitmap.createBitmap(fullSize, roundedTrueCrop.left,
715 if (crop == null) {
721 float[] dimsAfter = new float[] { crop.getWidth(), crop.getHeight() };
739 m1.setTranslate(-crop.getWidth() / 2f, -crop.getHeight() / 2f);
760 c.drawBitmap(crop, m, p);
[all …]
/frameworks/native/libs/gui/include/gui/
DBLASTBufferQueue.h216 Rect crop; member
219 uint32_t scalingMode, const Rect& crop) { in update()
225 if (!crop.isEmpty()) { in update()
226 this->crop = crop; in update()
228 this->crop = Rect(width, height); in update()
DCpuConsumer.h53 Rect crop; member
78 crop(Rect::EMPTY_RECT), in LockedBuffer()
/frameworks/native/libs/nativedisplay/surfacetexture/
DSurfaceTexture.cpp339 mat4 crop(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, 1, 0, tx, ty, 0, 1); in computeTransformMatrix() local
340 xform = crop * xform; in computeTransformMatrix()
352 Rect SurfaceTexture::scaleDownCrop(const Rect& crop, uint32_t bufferWidth, uint32_t bufferHeight) { in scaleDownCrop() argument
353 Rect outCrop = crop; in scaleDownCrop()
355 uint32_t newWidth = static_cast<uint32_t>(crop.width()); in scaleDownCrop()
356 uint32_t newHeight = static_cast<uint32_t>(crop.height()); in scaleDownCrop()
366 uint32_t currentWidth = static_cast<uint32_t>(crop.width()); in scaleDownCrop()
367 uint32_t currentHeight = static_cast<uint32_t>(crop.height()); in scaleDownCrop()
/frameworks/base/core/java/android/window/
DSnapshotDrawerUtils.java212 Rect crop = null; in drawSizeMismatchSnapshot() local
216 crop = calculateSnapshotCrop(letterboxInsets); in drawSizeMismatchSnapshot()
218 aspectRatioMismatch = !isAspectRatioMatch(mFrame, crop); in drawSizeMismatchSnapshot()
224 crop = calculateSnapshotCrop(contentInsets); in drawSizeMismatchSnapshot()
228 frame = calculateSnapshotFrame(crop); in drawSizeMismatchSnapshot()
229 mTransaction.setCrop(childSurfaceControl, crop); in drawSizeMismatchSnapshot()
298 public Rect calculateSnapshotFrame(Rect crop) { in calculateSnapshotFrame() argument
304 (int) (crop.width() / scaleX + 0.5f), in calculateSnapshotFrame()
305 (int) (crop.height() / scaleY + 0.5f) in calculateSnapshotFrame()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/
DImageCaptureImpl.kt40 override fun captureDisplay(displayId: Int, crop: Rect?): Bitmap? { in captureDisplay()
42 .setSourceCrop(crop) in captureDisplay()
/frameworks/libs/native_bridge_support/android_api/libjnigraphics/proxy/
Dlibjnigraphics_trampolines.cc47 ARect crop{left, top, right, bottom}; in DoCustomTrampoline_AImageDecoder_setCrop() local
49 ret = AImageDecoder_setCrop(decoder, crop); in DoCustomTrampoline_AImageDecoder_setCrop()
/frameworks/native/libs/gui/
DGLConsumerUtils.cpp112 mat4 crop( in computeTransformMatrix() local
118 xform = crop * xform; in computeTransformMatrix()
/frameworks/native/opengl/tests/textures/
Dtextures.cpp66 GLint crop[4] = { 0, 4, 4, -4 }; in main() local
68 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); in main()
/frameworks/base/native/graphics/jni/
Dimagedecoder.cpp376 int AImageDecoder_setCrop(AImageDecoder* decoder, ARect crop) { in AImageDecoder_setCrop() argument
387 cropIRect.setLTRB(crop.left, crop.top, crop.right, crop.bottom); in AImageDecoder_setCrop()
/frameworks/native/libs/renderengine/skia/
DSkiaRenderEngine.cpp116 static bool intersectionIsRoundRect(const SkRect& bounds, const SkRect& crop, in intersectionIsRoundRect() argument
119 const bool leftEqual = bounds.fLeft == crop.fLeft; in intersectionIsRoundRect()
120 const bool topEqual = bounds.fTop == crop.fTop; in intersectionIsRoundRect()
121 const bool rightEqual = bounds.fRight == crop.fRight; in intersectionIsRoundRect()
122 const bool bottomEqual = bounds.fBottom == crop.fBottom; in intersectionIsRoundRect()
181 const SkRect crop = getSkRect(cropRect); in getBoundsAndClip() local
186 if (bounds == crop || crop.isEmpty()) { in getBoundsAndClip()
193 if (crop.contains(bounds)) { in getBoundsAndClip()
194 const auto insetCrop = crop.makeInset(cornerRadius.x, cornerRadius.y); in getBoundsAndClip()
200 if (intersectionIsRoundRect(bounds, crop, insetCrop, cornerRadius, radii)) { in getBoundsAndClip()
[all …]

123456