| Index: cc/resources/drawing_display_item.cc
|
| diff --git a/cc/resources/drawing_display_item.cc b/cc/resources/drawing_display_item.cc
|
| index 0fe86f40d272098922a360cc00caf6b13912d47f..9a0f9ce978292040c1d3841b6deb9150cd4c2ce2 100644
|
| --- a/cc/resources/drawing_display_item.cc
|
| +++ b/cc/resources/drawing_display_item.cc
|
| @@ -17,9 +17,8 @@
|
|
|
| namespace cc {
|
|
|
| -DrawingDisplayItem::DrawingDisplayItem(skia::RefPtr<SkPicture> picture,
|
| - gfx::PointF location)
|
| - : picture_(picture), location_(location) {
|
| +DrawingDisplayItem::DrawingDisplayItem(skia::RefPtr<const SkPicture> picture)
|
| + : picture_(picture) {
|
| }
|
|
|
| DrawingDisplayItem::~DrawingDisplayItem() {
|
| @@ -28,7 +27,7 @@ DrawingDisplayItem::~DrawingDisplayItem() {
|
| void DrawingDisplayItem::Raster(SkCanvas* canvas,
|
| SkDrawPictureCallback* callback) const {
|
| canvas->save();
|
| - canvas->translate(location_.x(), location_.y());
|
| + canvas->translate(picture_->cullRect().x(), picture_->cullRect().y());
|
| if (callback)
|
| picture_->playback(canvas, callback);
|
| else
|
| @@ -38,7 +37,7 @@ void DrawingDisplayItem::Raster(SkCanvas* canvas,
|
|
|
| void DrawingDisplayItem::RasterForTracing(SkCanvas* canvas) const {
|
| canvas->save();
|
| - canvas->translate(location_.x(), location_.y());
|
| + canvas->translate(picture_->cullRect().x(), picture_->cullRect().y());
|
| // The picture debugger in about:tracing doesn't drill down into |drawPicture|
|
| // operations. Calling |playback()| rather than |drawPicture()| causes the
|
| // skia operations in |picture_| to appear individually in the picture
|
|
|