Chromium Code Reviews| Index: cc/picture.cc |
| diff --git a/cc/picture.cc b/cc/picture.cc |
| index 378c20ea0bde935917c6543b3d01392a70c2ebac..b0e36e89c17b186b911bbee97184c496771b5a5a 100644 |
| --- a/cc/picture.cc |
| +++ b/cc/picture.cc |
| @@ -10,6 +10,7 @@ |
| #include "third_party/skia/include/core/SkData.h" |
| #include "third_party/skia/include/utils/SkPictureUtils.h" |
| #include "ui/gfx/rect_conversions.h" |
| +#include "ui/gfx/skia_util.h" |
| namespace { |
| // URI label for a lazily decoded SkPixelRef. |
| @@ -88,10 +89,16 @@ void Picture::Record(ContentLayerClient* painter, |
| opaque_rect_ = gfx::ToEnclosedRect(opaque_layer_rect); |
| } |
| -void Picture::Raster(SkCanvas* canvas) { |
| +void Picture::Raster( |
| + SkCanvas* canvas, |
| + gfx::Rect content_rect, |
| + float contents_scale) { |
| TRACE_EVENT0("cc", "Picture::Raster"); |
| DCHECK(picture_); |
| + |
| canvas->save(); |
| + canvas->clipRect(gfx::RectToSkRect(content_rect)); |
|
danakj
2013/01/05 00:04:58
I find this ordering weird..
Is the scale the sca
enne (OOO)
2013/01/06 03:57:18
These are applied to the canvas, so any recorded o
|
| + canvas->scale(contents_scale, contents_scale); |
| canvas->translate(layer_rect_.x(), layer_rect_.y()); |
| canvas->drawPicture(*picture_); |
| canvas->restore(); |