- 
kylechar authoredThis CL fixes a bug where LayerTreeHostImpl::OnPurgeMemory() causes TextureLayerImpl to register duplicate SharedBitmapIds. OnPurgeMemory() ends up calling TextureLayerImpl::ReleaseResources(), which assumed that the LayerTreeFrameSink was lost if it was called. SharedBitmapIds should only be reregistered if the LayerTreeFrameSink is actually lost. Add new OnPurgeMemory() function on LayerImpl. This will by default keep the old behaviour by calling ReleaseResources() but TextureLayerImpl can override it to not do anything. Bug: 862584 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I32cd4e45d629b2f8410adff80f712f1b517a1407 Reviewed-on: https://chromium-review.googlesource.com/1169430Reviewed-by: weiliangc <weiliangc@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#582045} 599aeebe