Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: ui/compositor/paint_recorder.cc

Issue 1494223003: cc: Shrink size of display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix some compilation issues in ui oops Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/paint_cache.cc ('k') | ui/compositor/transform_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/paint_recorder.h" 5 #include "ui/compositor/paint_recorder.h"
6 6
7 #include "cc/playback/display_item_list.h" 7 #include "cc/playback/display_item_list.h"
8 #include "cc/playback/drawing_display_item.h" 8 #include "cc/playback/drawing_display_item.h"
9 #include "third_party/skia/include/core/SkPictureRecorder.h" 9 #include "third_party/skia/include/core/SkPictureRecorder.h"
10 #include "ui/compositor/paint_cache.h" 10 #include "ui/compositor/paint_cache.h"
(...skipping 23 matching lines...) Expand all
34 34
35 PaintRecorder::PaintRecorder(const PaintContext& context, 35 PaintRecorder::PaintRecorder(const PaintContext& context,
36 const gfx::Size& recording_size) 36 const gfx::Size& recording_size)
37 : PaintRecorder(context, recording_size, nullptr) { 37 : PaintRecorder(context, recording_size, nullptr) {
38 } 38 }
39 39
40 PaintRecorder::~PaintRecorder() { 40 PaintRecorder::~PaintRecorder() {
41 #if DCHECK_IS_ON() 41 #if DCHECK_IS_ON()
42 context_.inside_paint_recorder_ = false; 42 context_.inside_paint_recorder_ = false;
43 #endif 43 #endif
44 44 const auto& item =
45 auto* item = context_.list_->CreateAndAppendItem<cc::DrawingDisplayItem>( 45 context_.list_->CreateAndAppendItem<cc::DrawingDisplayItem>(
46 bounds_in_layer_); 46 bounds_in_layer_,
47 item->SetNew(skia::AdoptRef(context_.recorder_->endRecordingAsPicture())); 47 skia::AdoptRef(context_.recorder_->endRecordingAsPicture()));
48 if (cache_) 48 if (cache_)
49 cache_->SetCache(item); 49 cache_->SetCache(item);
50 } 50 }
51 51
52 } // namespace ui 52 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/paint_cache.cc ('k') | ui/compositor/transform_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698