cc: Fix potential texture lifetime issues in the GPU image cache.
This fixes 2 bugs which could result in using invalid textures from the image cache, if an image is originally uploaded at original size and mips are generated with a subsequent copy later. 1) When we generate mips the original texture is deleted, while if the DrawImage is ref-ed and there is an external ref on the SkImage backed by the original texture it could potentially be used after its deleted. 2) If skia fails to mip the texture for any reason, the "mipped" image returned is backed by the original texture which we would subsequently delete. R=ccameron@chromium.org, ericrk@chromium.org TBR=piman@chromium.org Bug: 870317 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;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iec925f35c7880db89f9b68a9cee5e0b76b8ce4d9 Reviewed-on: https://chromium-review.googlesource.com/1171960Reviewed-by:Khushal <khushalsagar@chromium.org> Reviewed-by:
enne <enne@chromium.org> Commit-Queue: Khushal <khushalsagar@chromium.org> Cr-Commit-Position: refs/heads/master@{#582484}
Showing
Please register or sign in to comment