Fix bug in plot locking system
authorrobertphillips <robertphillips@google.com>
Thu, 9 Oct 2014 19:30:10 +0000 (12:30 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 9 Oct 2014 19:30:10 +0000 (12:30 -0700)
commit5c481666c9678f43e039ad605457be3854cf8de3
tree9336f9c76012a80594353871865e38e5f4367048
parent27415b71bd529456165945e19b5b7efbebf6fb51
Fix bug in plot locking system

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 the plot locking system to add a pseudo-ref for each GrHoistedLayer.

NOTRY=true

Review URL: https://codereview.chromium.org/640323002
src/gpu/GrLayerCache.cpp
src/gpu/GrLayerCache.h