• yiyix's avatar
    Fix Regression: Integer-overflow in viz::Display::RemoveOverdrawQuads · 49402155
    yiyix authored
    In draw occlusion algorithm, the total area of drawing is calculated to
    measure the effectiveness of draw occlusion. However, the integer
    multiplication in the area calculation has caused the integer overflow
    crash with huge draw quads. In this patch, I used GetCheckedArea() to
    check for the resulting area before assigning.
    
    Bug: 826727
    
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
    Change-Id: I667b458ca6f7d477ba13036868536dd842e59068
    Reviewed-on: https://chromium-review.googlesource.com/991121
    Commit-Queue: Yi Xu <yiyix@chromium.org>
    Reviewed-by: default avatardanakj <danakj@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#547856}
    49402155
display_unittest.cc 146 KB