Chromium Code Reviews| 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)); |
| } |