Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1686)

Unified Diff: experimental/nanomsg/picture_demo.cpp

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT again Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DMUtil.cpp ('k') | gm/distantclip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/nanomsg/picture_demo.cpp
diff --git a/experimental/nanomsg/picture_demo.cpp b/experimental/nanomsg/picture_demo.cpp
index 5a3ebdc8167877e7f29a353f7388d19b192b4163..f04a96e9563f7c986139daabd42028033446b797 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);
« no previous file with comments | « dm/DMUtil.cpp ('k') | gm/distantclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698