Reduce overdraw in MultiPictureDraw Sierpinski GM
As written, all the layers in the MPD Sierpinski GM are full screen. This CL bounds each layer to reduce overdraw. This CL will cause differences in: multipicturedraw_sierpinski_simple multipicturedraw_sierpinski_tiled but they are/will be suppressed in: (Don't turn on dither for saveLayers which have no paint - https://codereview.chromium.org/619363002/) Review URL: https://codereview.chromium.org/582633003
This commit is contained in:
parent
4611e7f479
commit
7f1ed835e9
@ -155,6 +155,9 @@ static const SkPicture* make_tri_picture() {
|
||||
|
||||
SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth),
|
||||
SkIntToScalar(kPicHeight));
|
||||
SkRect r = tri.getBounds();
|
||||
r.outset(2.0f, 2.0f); // outset for stroke
|
||||
canvas->clipRect(r);
|
||||
// The saveLayer/restore block is to exercise layer hoisting
|
||||
canvas->saveLayer(NULL, NULL);
|
||||
canvas->drawPath(tri, fill);
|
||||
|
Loading…
Reference in New Issue
Block a user