OSDN Git Service

Fix typo in Region to avoid unexpected values
authorFabien Sanglard <sanglardf@google.com>
Fri, 17 Feb 2017 03:29:35 +0000 (19:29 -0800)
committerFabien Sanglard <sanglardf@google.com>
Thu, 2 Mar 2017 18:56:29 +0000 (10:56 -0800)
commitf8e9366df2fc079c37de6ea35d70bf2b227e6946
treee82841ec5e22453288ad2d4d0e0c204f344e43a3
parent16401044cb4f2c9f487bdf6abb9aeb7d1e3de578
Fix typo in Region to avoid unexpected values

b/34193533 showed that Framework can sometimes use very large rect
(presumably to hide a window **very** far out of the screen visible
rectangle). Which results in SF freezing and using 100% of CPU.

max_value is not initialized to the right value. Really it should be
0x7FFFFFFF instead of
0x7FFFFFF
Since Region was templatized (originally to potentially use int16_t)
the fix uses C++11 numeric_limits instead of INT_MAX.

Test: Manual
Change-Id: Iaee64727226730dbea1f05618a97b801254cde4d
include/private/ui/RegionHelper.h