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 "third_party/skia/include/core/SkCanvas.h" | 8 #include "third_party/skia/include/core/SkCanvas.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 scoped_refptr<PictureImageLayer> PictureImageLayer::Create() { | 12 scoped_refptr<PictureImageLayer> PictureImageLayer::Create() { |
13 return make_scoped_refptr(new PictureImageLayer()); | 13 return make_scoped_refptr(new PictureImageLayer()); |
14 } | 14 } |
15 | 15 |
16 PictureImageLayer::PictureImageLayer() : PictureLayer(this) {} | 16 PictureImageLayer::PictureImageLayer() : PictureLayer(this) {} |
17 | 17 |
18 PictureImageLayer::~PictureImageLayer() { | 18 PictureImageLayer::~PictureImageLayer() { |
19 ClearClient(); | 19 ClearClient(); |
20 } | 20 } |
21 | 21 |
22 scoped_ptr<LayerImpl> PictureImageLayer::CreateLayerImpl( | 22 scoped_ptr<LayerImpl> PictureImageLayer::CreateLayerImpl( |
23 LayerTreeImpl* tree_impl) { | 23 LayerTreeImpl* tree_impl) { |
24 return PictureImageLayerImpl::Create(tree_impl, id()); | 24 return PictureImageLayerImpl::Create(tree_impl, id(), is_mask()); |
25 } | 25 } |
26 | 26 |
27 bool PictureImageLayer::HasDrawableContent() const { | 27 bool PictureImageLayer::HasDrawableContent() const { |
28 return !bitmap_.isNull() && PictureLayer::HasDrawableContent(); | 28 return !bitmap_.isNull() && PictureLayer::HasDrawableContent(); |
29 } | 29 } |
30 | 30 |
31 void PictureImageLayer::SetBitmap(const SkBitmap& bitmap) { | 31 void PictureImageLayer::SetBitmap(const SkBitmap& bitmap) { |
32 // SetBitmap() currently gets called whenever there is any | 32 // SetBitmap() currently gets called whenever there is any |
33 // style change that affects the layer even if that change doesn't | 33 // style change that affects the layer even if that change doesn't |
34 // affect the actual contents of the image (e.g. a CSS animation). | 34 // affect the actual contents of the image (e.g. a CSS animation). |
(...skipping 30 matching lines...) Expand all Loading... |
65 GraphicsContextStatus gc_status) { | 65 GraphicsContextStatus gc_status) { |
66 NOTIMPLEMENTED(); | 66 NOTIMPLEMENTED(); |
67 return DisplayItemList::Create(); | 67 return DisplayItemList::Create(); |
68 } | 68 } |
69 | 69 |
70 bool PictureImageLayer::FillsBoundsCompletely() const { | 70 bool PictureImageLayer::FillsBoundsCompletely() const { |
71 return false; | 71 return false; |
72 } | 72 } |
73 | 73 |
74 } // namespace cc | 74 } // namespace cc |
OLD | NEW |