diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2019-11-06 10:27:12 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-11-06 10:27:12 -0800 |
commit | 1b8476601fcb1dcce56989361920fc2294138f7e (patch) | |
tree | 020716159e8b6cad5b1afd8ba64ce31d767ec69c | |
parent | 6d972d0f94026a3c0458758d132d58a27b4609f9 (diff) | |
parent | 6c437f1058c32be62197e3f582551a8c6555030a (diff) | |
download | native-1b8476601fcb1dcce56989361920fc2294138f7e.tar.gz |
Merge "Revert "SurfaceFlinger: debug layer bounds inset"" am: bfe7d2873a
am: 6c437f1058
Change-Id: Ie6708e4907daefedfdf7e19c35555e254a2e13c6
-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 6c1a8aa7a6..b74442555c 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -2036,13 +2036,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; @@ -2072,26 +2065,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. |