Fix two SkRecord-backed layer hoisting bugs
authorrobertphillips <robertphillips@google.com>
Mon, 8 Sep 2014 18:37:59 +0000 (11:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 8 Sep 2014 18:37:59 +0000 (11:37 -0700)
commit46625e06e23b65c05013fc686a8223d6d5b49050
treebecbbe42d34f0b14e628236712121e3d1f30e0ff
parent858baf5b7da669f88ab8c8cf08b5230432a174a0
Fix two SkRecord-backed layer hoisting bugs

The two bugs are/were:
The old loop to draw the hoisted layers included the saveLayer call which caused double application of the layer's paint (This is the +1 change).

The hoisted layer is intended to be drawn in device coordinates. The old code was drawing it in the coordinate space of the saveLayer thus it was misplaced (This is the setMatrix change).

Committed: https://skia.googlesource.com/skia/+/7c0cfd4ff8f6db50a8731c886db732b106268937

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/551843002
src/gpu/GrLayerHoister.cpp
src/gpu/GrRecordReplaceDraw.cpp
tests/RecordReplaceDrawTest.cpp