Update GrRecordReplaceDraw to use SkTDynamicHash & add ReplaceDraw
authorrobertphillips <robertphillips@google.com>
Wed, 1 Oct 2014 16:24:06 +0000 (09:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 1 Oct 2014 16:24:06 +0000 (09:24 -0700)
commit68cd2aa797f707a9847f8eba0758787cafd43e43
tree2748e017fe0325303970e9d7eb71d74178da6706
parentdbcb5ff125e127fe48597a7a1956c73a5e316e3e
Update GrRecordReplaceDraw to use SkTDynamicHash & add ReplaceDraw

Having hoisted layers from different pictures invalidates the assumptions of the old GrReplacements object. This is fixed by switching to a SkTDynamicHash-based back-end.

Sub-picture-layers also require that the replacement drawing occur for the sub-pictures too. The ReplaceDraw object is added to make this happen and limit the replacement lookup to saveLayer draw commands.

This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/).

BUG=skia:2315

Review URL: https://codereview.chromium.org/607763008
include/core/SkPicture.h
src/gpu/GrLayerHoister.cpp
src/gpu/GrRecordReplaceDraw.cpp
src/gpu/GrRecordReplaceDraw.h
tests/RecordReplaceDrawTest.cpp