diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-01-25 16:48:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-01-25 16:48:24 +0000 |
commit | 5466086d22c504bc563e10c94078ea342f9e2d4e (patch) | |
tree | 8893c32825ee1041b7578a05370de87ef031fc0c | |
parent | 6eb7767c4f1a7e3d1bb638e9a57992c38f2a872d (diff) | |
parent | e9f0d589b7385084abe53dc3cbf7d202e9ea86a3 (diff) | |
download | native-5466086d22c504bc563e10c94078ea342f9e2d4e.tar.gz |
Merge "Revert "SurfaceFlinger: debug layer bounds inset"" into android10-gsi
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 44f3eae1ea..6f87fb0f9c 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -2037,13 +2037,6 @@ bool Layer::isRemovedFromCurrentState() const { return mRemovedFromCurrentState; } -// Debug helper for b/137560795 -#define INT32_MIGHT_OVERFLOW(n) (((n) >= INT32_MAX / 2) || ((n) <= INT32_MIN / 2)) - -#define RECT_BOUNDS_INVALID(rect) \ - (INT32_MIGHT_OVERFLOW((rect).left) || INT32_MIGHT_OVERFLOW((rect).right) || \ - INT32_MIGHT_OVERFLOW((rect).bottom) || INT32_MIGHT_OVERFLOW((rect).top)) - InputWindowInfo Layer::fillInputInfo() { InputWindowInfo info = mDrawingState.inputInfo; @@ -2073,26 +2066,6 @@ InputWindowInfo Layer::fillInputInfo() { layerBounds = getCroppedBufferSize(getDrawingState()); } layerBounds = t.transform(layerBounds); - - // debug check for b/137560795 - { - if (RECT_BOUNDS_INVALID(layerBounds)) { - ALOGE("layer %s bounds are invalid (%" PRIi32 ", %" PRIi32 ", %" PRIi32 ", %" PRIi32 - ")", - mName.c_str(), layerBounds.left, layerBounds.top, layerBounds.right, - layerBounds.bottom); - std::string out; - getTransform().dump(out, "Transform"); - ALOGE("%s", out.c_str()); - layerBounds.left = layerBounds.top = layerBounds.right = layerBounds.bottom = 0; - } - - if (INT32_MIGHT_OVERFLOW(xSurfaceInset) || INT32_MIGHT_OVERFLOW(ySurfaceInset)) { - ALOGE("layer %s surface inset are invalid (%" PRIi32 ", %" PRIi32 ")", mName.c_str(), - int32_t(xSurfaceInset), int32_t(ySurfaceInset)); - xSurfaceInset = ySurfaceInset = 0; - } - } layerBounds.inset(xSurfaceInset, ySurfaceInset, xSurfaceInset, ySurfaceInset); // Input coordinate should match the layer bounds. |