Fix bug in GrCachedLayer reuse

In the new MultiPictureDraw tests a single hoisted layer is reused multiple times. The previous plot locking scheme allowed GrCachedLayer objects to be aggressively deleted prematurely leaving the reusing GrHoistedLayer objects with dangling pointers.

This CL changes adds a new pseudo-ref to GrCachedLayer. (It can't be a real ref since the cached layers aren't deleted when it goes to 0).

NOTRY=true

Committed: https://skia.googlesource.com/skia/+/5c481666c9678f43e039ad605457be3854cf8de3

Review URL: https://codereview.chromium.org/640323002
4 files changed