diff options
author | 2014-09-08 09:53:58 -0700 | |
---|---|---|
committer | 2014-09-08 09:53:58 -0700 | |
commit | 7c0cfd4ff8f6db50a8731c886db732b106268937 (patch) | |
tree | 0220bf2943e57b16c15c50e2a2f1327c7bab9d81 /src/gpu/GrLayerHoister.cpp | |
parent | 23c94f05cad79f6f8d303c1b4ffb6d0b91671e83 (diff) |
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).
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/551843002
Diffstat (limited to 'src/gpu/GrLayerHoister.cpp')
-rw-r--r-- | src/gpu/GrLayerHoister.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp index ac09df825b..49ca338bb2 100644 --- a/src/gpu/GrLayerHoister.cpp +++ b/src/gpu/GrLayerHoister.cpp @@ -95,7 +95,7 @@ void GrLayerHoister::DrawLayers(const SkPicture* picture, atlasCanvas->concat(layer->ctm()); SkRecordPartialDraw(*picture->fRecord.get(), atlasCanvas, bound, - layer->start(), layer->stop()); + layer->start()+1, layer->stop()); atlasCanvas->restore(); } @@ -129,7 +129,7 @@ void GrLayerHoister::DrawLayers(const SkPicture* picture, layerCanvas->concat(layer->ctm()); SkRecordPartialDraw(*picture->fRecord.get(), layerCanvas, bound, - layer->start(), layer->stop()); + layer->start()+1, layer->stop()); layerCanvas->flush(); } |