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

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: 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') | no next file with comments »
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..4075747964aeb8a168649ea90e4ccf1f4334229e 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(skr.x(), skr.y(), skr.width(), skr.height());
danakj 2014/12/12 17:11:37 You can use this https://code.google.com/p/chromiu
reed1 2014/12/12 18:51:35 perfect, thanks.
return make_scoped_refptr(new Picture(skpicture, layer_rect));
}
« no previous file with comments | « no previous file | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698