• Jonathan Backer's avatar
    Check tex_image_failed instead of glGetError · 20797261
    Jonathan Backer authored
    TextureManager does some validation and will reject a bad glTexImage2D
    before it gets issued to the driver. We should prefer to check
    tex_image_failed (which is set by TextureManager) over glGetError.
    
    This issue was found by clusterfuzz. I added a gpu_unittest that fails
    without this change because it hits DCHECKS in texture_manager.cc when
    we call SetImmutable in raster_decoder.cc.
    
    I have confirmed locally that this CL resolves the clusterfuzz issue.
    
    Bug: 850056
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
    Change-Id: Ibedec4ccc9ec4e3758eb38292642a8671ee8f975
    Reviewed-on: https://chromium-review.googlesource.com/1089030Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
    Commit-Queue: Jonathan Backer <backer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#564953}
    20797261
raster_decoder.cc 119 KB