| Index: ui/compositor/paint_recorder.cc
|
| diff --git a/ui/compositor/paint_recorder.cc b/ui/compositor/paint_recorder.cc
|
| index 80fb616a35fa169554fbedeb61e73692368db7f6..15aa0fb8edff443e07c3d98a19276fed1b66ca86 100644
|
| --- a/ui/compositor/paint_recorder.cc
|
| +++ b/ui/compositor/paint_recorder.cc
|
| @@ -7,15 +7,14 @@
|
| #include "cc/resources/display_item_list.h"
|
| #include "cc/resources/drawing_display_item.h"
|
| #include "third_party/skia/include/core/SkPictureRecorder.h"
|
| -#include "ui/compositor/paint_cache.h"
|
| #include "ui/compositor/paint_context.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/skia_util.h"
|
|
|
| namespace ui {
|
|
|
| -PaintRecorder::PaintRecorder(const PaintContext& context, PaintCache* cache)
|
| - : context_(context), canvas_(context.canvas_), cache_(cache) {
|
| +PaintRecorder::PaintRecorder(const PaintContext& context)
|
| + : context_(context), canvas_(context.canvas_) {
|
| #if DCHECK_IS_ON()
|
| DCHECK(!context.inside_paint_recorder_);
|
| context.inside_paint_recorder_ = true;
|
| @@ -35,23 +34,15 @@
|
| }
|
| }
|
|
|
| -PaintRecorder::PaintRecorder(const PaintContext& context)
|
| - : PaintRecorder(context, nullptr) {
|
| -}
|
| -
|
| PaintRecorder::~PaintRecorder() {
|
| #if DCHECK_IS_ON()
|
| context_.inside_paint_recorder_ = false;
|
| #endif
|
|
|
| - if (!context_.list_)
|
| - return;
|
| -
|
| - scoped_ptr<cc::DrawingDisplayItem> item = cc::DrawingDisplayItem::Create(
|
| - skia::AdoptRef(context_.recorder_->endRecordingAsPicture()));
|
| - if (cache_)
|
| - cache_->SetCache(item->Clone());
|
| - context_.list_->AppendItem(item.Pass());
|
| + if (context_.list_) {
|
| + context_.list_->AppendItem(cc::DrawingDisplayItem::Create(
|
| + skia::AdoptRef(context_.recorder_->endRecordingAsPicture())));
|
| + }
|
| }
|
|
|
| } // namespace ui
|
|
|