OLD | NEW |
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 Loading... |
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 |
OLD | NEW |