Resolve GrSurface/GrSurfaceProxy ref counting issue in GrResourceAllocator

The underlying issue is/was that (given that GrResourceProvider::createApproxTexture can pull a scratch texture out of the resource cache) resources the GrResourceAllocator thought is was controlling could magically be re-assigned behind its back. This CL resolves the issue by having the GrResourceAllocator maintain a strong ref on all the resources it believes it is controlling.

Change-Id: Ibcf49009dc953bd97d882177284eb57490cd5711
Reviewed-on: https://skia-review.googlesource.com/70722
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2 files changed