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
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);