diff options
author | robertphillips <robertphillips@google.com> | 2014-08-29 08:03:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-29 08:03:56 -0700 |
commit | a8d7f0b13cd4c6d773fcf055fe17db75d260fa05 (patch) | |
tree | 37e85b212ccd5761b9a736282e75ebf838840798 /experimental | |
parent | 77d724c07878b21602e96e095f6a446c429a079a (diff) |
Try out scalar picture sizes
This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.
R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/513983002
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/nanomsg/picture_demo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/experimental/nanomsg/picture_demo.cpp b/experimental/nanomsg/picture_demo.cpp index 5a3ebdc816..f04a96e956 100644 --- a/experimental/nanomsg/picture_demo.cpp +++ b/experimental/nanomsg/picture_demo.cpp @@ -82,9 +82,9 @@ static void client(const char* skpPath, const char* dataEndpoint) { SkAutoTUnref<SkPicture> picture(SkPicture::CreateFromStream(&stream)); PictureHeader header; - SkRandom rand(picture->width() * picture->height()); - SkScalar r = rand.nextRangeScalar(0, picture->width()), - b = rand.nextRangeScalar(0, picture->height()), + SkRandom rand(picture->cullRect().width() * picture->cullRect().height()); + SkScalar r = rand.nextRangeScalar(0, picture->cullRect().width()), + b = rand.nextRangeScalar(0, picture->cullRect().height()), l = rand.nextRangeScalar(0, r), t = rand.nextRangeScalar(0, b); header.clip.setLTRB(l,t,r,b); |