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

Unified Diff: cc/resources/picture.cc

Issue 797753003: use picture->cullRect instead of (deprecated) width/height (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use SkIRectToRect helper Created 6 years 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 | « no previous file | skia/config/SkUserConfig.h » ('j') | skia/ext/pixel_ref_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 6530866d6a03dce9a4d6374a53693fe70f73cdaa..10591b9b1412ce13a7bbecda4b546df5e56ac83b 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -121,7 +121,8 @@ scoped_refptr<Picture> Picture::CreateFromSkpValue(const base::Value* value) {
if (skpicture == NULL)
return NULL;
- gfx::Rect layer_rect(skpicture->width(), skpicture->height());
+ const SkIRect skr = skpicture->cullRect().roundOut();
+ gfx::Rect layer_rect(gfx::SkIRectToRect(skr));
danakj 2014/12/12 18:53:02 nit: just do gfx::Rect layer_rect(gfx::SkIRectToRe
reed1 2014/12/12 19:12:02 Done.
return make_scoped_refptr(new Picture(skpicture, layer_rect));
}
« no previous file with comments | « no previous file | skia/config/SkUserConfig.h » ('j') | skia/ext/pixel_ref_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698