| Index: cc/layers/content_layer.cc
|
| diff --git a/cc/layers/content_layer.cc b/cc/layers/content_layer.cc
|
| index 2053ecbeac10f10610d30aa1be167270aa5808cf..7ad848ea12453d8cbec8134b046d5623292bf0dc 100644
|
| --- a/cc/layers/content_layer.cc
|
| +++ b/cc/layers/content_layer.cc
|
| @@ -145,4 +145,19 @@ bool ContentLayer::SupportsLCDText() const {
|
| return true;
|
| }
|
|
|
| +skia::RefPtr<SkPicture> ContentLayer::GetPicture() const {
|
| + if (!DrawsContent())
|
| + return skia::RefPtr<SkPicture>();
|
| +
|
| + int width = bounds().width();
|
| + int height = bounds().height();
|
| + gfx::RectF opaque;
|
| +
|
| + skia::RefPtr<SkPicture> picture = skia::AdoptRef(new SkPicture);
|
| + SkCanvas* canvas = picture->beginRecording(width, height);
|
| + client_->PaintContents(canvas, gfx::Rect(width, height), &opaque);
|
| + picture->endRecording();
|
| + return picture;
|
| +}
|
| +
|
| } // namespace cc
|
|
|