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

Side by Side Diff: cc/layers/picture_image_layer.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 months 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 | « cc/layers/picture_image_layer.h ('k') | cc/layers/picture_image_layer_unittest.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 "cc/layers/picture_image_layer.h" 5 #include "cc/layers/picture_image_layer.h"
6 6
7 #include "cc/layers/picture_image_layer_impl.h" 7 #include "cc/layers/picture_image_layer_impl.h"
8 #include "cc/playback/drawing_display_item.h" 8 #include "cc/playback/drawing_display_item.h"
9 #include "third_party/skia/include/core/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/core/SkPictureRecorder.h" 10 #include "third_party/skia/include/core/SkPictureRecorder.h"
11 #include "ui/gfx/skia_util.h" 11 #include "ui/gfx/skia_util.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 scoped_refptr<PictureImageLayer> PictureImageLayer::Create() { 15 scoped_refptr<PictureImageLayer> PictureImageLayer::Create(
16 return make_scoped_refptr(new PictureImageLayer()); 16 const LayerSettings& settings) {
17 return make_scoped_refptr(new PictureImageLayer(settings));
17 } 18 }
18 19
19 PictureImageLayer::PictureImageLayer() : PictureLayer(this) {} 20 PictureImageLayer::PictureImageLayer(const LayerSettings& settings)
21 : PictureLayer(settings, this) {
22 }
20 23
21 PictureImageLayer::~PictureImageLayer() { 24 PictureImageLayer::~PictureImageLayer() {
22 ClearClient(); 25 ClearClient();
23 } 26 }
24 27
25 scoped_ptr<LayerImpl> PictureImageLayer::CreateLayerImpl( 28 scoped_ptr<LayerImpl> PictureImageLayer::CreateLayerImpl(
26 LayerTreeImpl* tree_impl) { 29 LayerTreeImpl* tree_impl) {
27 return PictureImageLayerImpl::Create(tree_impl, id(), is_mask()); 30 return PictureImageLayerImpl::Create(tree_impl, id(), is_mask());
28 } 31 }
29 32
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 skia::AdoptRef(recorder.endRecordingAsPicture()); 78 skia::AdoptRef(recorder.endRecordingAsPicture());
76 auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(); 79 auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>();
77 item->SetNew(picture.Pass()); 80 item->SetNew(picture.Pass());
78 } 81 }
79 82
80 bool PictureImageLayer::FillsBoundsCompletely() const { 83 bool PictureImageLayer::FillsBoundsCompletely() const {
81 return false; 84 return false;
82 } 85 }
83 86
84 } // namespace cc 87 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_image_layer.h ('k') | cc/layers/picture_image_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698