Commit a2b54520 authored by Findit's avatar Findit

Revert "Minor bug fix for incorrect DCHECK in display util"

This reverts commit fe197c07.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 561305 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2ZlMTk3YzA3ZDE2ZjdiZWQzNTQ0NTRhZDYzOTkxYmI5YjRmYWE1MjYM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.memory/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20%281%29/27583

Sample Failed Step: display_unittests

Original change's description:
> Minor bug fix for incorrect DCHECK in display util
> 
> This patch fixes an incorrect DCHECK that was landed in the previous
> patch. The DHCECK_LT should instead be DCHECK_GT.
> 
> Bug: 839458
> Change-Id: I4b45aae9a1cb1c3870774b4c3e2d654ffbf7bb4f
> OriginalChange: I4d5bd761506c6ec14dc92b3d3a120b87e02e2cb7
> Component: Display util, dsf, zoom levels
> Reviewed-on: https://chromium-review.googlesource.com/1070619
> Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
> Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#561305}

Change-Id: I803ccaa9ecb839f2efc4499c9f78dfbf346578ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 839458
Reviewed-on: https://chromium-review.googlesource.com/1070892
Cr-Commit-Position: refs/heads/master@{#561387}
parent d0e24978
...@@ -201,7 +201,7 @@ void InsertDsfIntoList(std::vector<float>* zoom_values, float dsf) { ...@@ -201,7 +201,7 @@ void InsertDsfIntoList(std::vector<float>* zoom_values, float dsf) {
DCHECK_LT(dsf, 1.f); DCHECK_LT(dsf, 1.f);
*(zoom_values->begin()) = dsf; *(zoom_values->begin()) = dsf;
} else if (it == zoom_values->end()) { } else if (it == zoom_values->end()) {
DCHECK_GT(dsf, 1.f); DCHECK_LT(dsf, 1.f);
*(zoom_values->rbegin()) = dsf; *(zoom_values->rbegin()) = dsf;
} else { } else {
// There can only be 1 entry for 1.f value. // There can only be 1 entry for 1.f value.
......
...@@ -209,13 +209,6 @@ TEST_F(DisplayUtilTest, InsertDsfIntoListGreaterThanUnity) { ...@@ -209,13 +209,6 @@ TEST_F(DisplayUtilTest, InsertDsfIntoListGreaterThanUnity) {
EXPECT_EQ(list[1].size(), kNumOfZoomFactors); EXPECT_EQ(list[1].size(), kNumOfZoomFactors);
EXPECT_EQ(list[0], list[1]); EXPECT_EQ(list[0], list[1]);
dsf = 1.1f;
list[0] = {0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1.f, 1.05f};
list[1] = {0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1.f, dsf};
InsertDsfIntoList(&list[0], dsf);
EXPECT_EQ(list[1].size(), kNumOfZoomFactors);
EXPECT_EQ(list[0], list[1]);
dsf = 1.1f; dsf = 1.1f;
list[0] = {0.6f, 0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1.f}; list[0] = {0.6f, 0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1.f};
list[1] = {0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1.f, dsf}; list[1] = {0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1.f, dsf};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment