diff options
author | robertphillips <robertphillips@google.com> | 2014-10-06 11:50:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-06 11:50:31 -0700 |
commit | 1564dde11af9f8ab1e4394af1599c5772accf710 (patch) | |
tree | 483e45b34a87f7792e57718ac39eb9f47aca63df /gm/multipicturedraw.cpp | |
parent | 0cb34b5ab637bced944144df5a1b7321def9ff35 (diff) |
Fix multipicturedraw_biglayer GM
Having a layer is a prerequisite for having it be hoisted.
Review URL: https://codereview.chromium.org/632743002
Diffstat (limited to 'gm/multipicturedraw.cpp')
-rw-r--r-- | gm/multipicturedraw.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gm/multipicturedraw.cpp b/gm/multipicturedraw.cpp index afa83e5176..8ce3deb763 100644 --- a/gm/multipicturedraw.cpp +++ b/gm/multipicturedraw.cpp @@ -106,6 +106,8 @@ static const SkPicture* make_single_layer_hex_plane_picture() { static const SkScalar kBig = 10000.0f; SkCanvas* canvas = recorder.beginRecording(kBig, kBig); + canvas->saveLayer(NULL, NULL); + SkScalar xPos = 0.0f, yPos = 0.0f; for (int y = 0; yPos < kBig; ++y) { @@ -127,6 +129,8 @@ static const SkPicture* make_single_layer_hex_plane_picture() { yPos += 2 * kHexSide * kRoot3Over2; } + canvas->restore(); + return recorder.endRecording(); } |