surfaceflinger: silence some RenderArea errors
Allow physical size and source crop size to be larger than the
logical size.
Bug: 113041375
Test: builds
Change-Id: I5a0e2158d114a6e06c8241b48d90bbb6172216cc
Merged-In: I5a0e2158d114a6e06c8241b48d90bbb6172216cc
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 5e2b974..b91c6c5 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4885,15 +4885,11 @@
std::swap(width, height);
}
- if ((reqWidth > width) || (reqHeight > height)) {
- ALOGE("size mismatch (%d, %d) > (%d, %d)", reqWidth, reqHeight, width, height);
- } else {
- if (reqWidth == 0) {
- reqWidth = width;
- }
- if (reqHeight == 0) {
- reqHeight = height;
- }
+ if (reqWidth == 0) {
+ reqWidth = width;
+ }
+ if (reqHeight == 0) {
+ reqHeight = height;
}
}
@@ -5145,20 +5141,6 @@
sourceCrop = tr.transform(sourceCrop);
}
- // ensure that sourceCrop is inside screen
- if (sourceCrop.left < 0) {
- ALOGE("Invalid crop rect: l = %d (< 0)", sourceCrop.left);
- }
- if (sourceCrop.right > raWidth) {
- ALOGE("Invalid crop rect: r = %d (> %d)", sourceCrop.right, raWidth);
- }
- if (sourceCrop.top < 0) {
- ALOGE("Invalid crop rect: t = %d (< 0)", sourceCrop.top);
- }
- if (sourceCrop.bottom > raHeight) {
- ALOGE("Invalid crop rect: b = %d (> %d)", sourceCrop.bottom, raHeight);
- }
-
// assume ColorMode::SRGB / RenderIntent::COLORIMETRIC
engine.setOutputDataSpace(Dataspace::SRGB);
engine.setDisplayMaxLuminance(DisplayDevice::sDefaultMaxLumiance);