OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/solid_color_layer_impl.h" | 5 #include "cc/layers/solid_color_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "cc/layers/append_quads_data.h" | 9 #include "cc/layers/append_quads_data.h" |
10 #include "cc/quads/solid_color_draw_quad.h" | 10 #include "cc/quads/solid_color_draw_quad.h" |
11 #include "cc/trees/occlusion.h" | 11 #include "cc/trees/occlusion.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 namespace { | 15 namespace { |
16 const int kSolidQuadTileSize = 256; | 16 const int kSolidQuadTileSize = 256; |
17 } | 17 } |
18 | 18 |
19 SolidColorLayerImpl::SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id) | 19 SolidColorLayerImpl::SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id) |
20 : LayerImpl(tree_impl, id) { | 20 : LayerImpl(tree_impl, id) { |
21 } | 21 } |
22 | 22 |
23 SolidColorLayerImpl::~SolidColorLayerImpl() {} | 23 SolidColorLayerImpl::~SolidColorLayerImpl() {} |
24 | 24 |
25 scoped_ptr<LayerImpl> SolidColorLayerImpl::CreateLayerImpl( | 25 std::unique_ptr<LayerImpl> SolidColorLayerImpl::CreateLayerImpl( |
26 LayerTreeImpl* tree_impl) { | 26 LayerTreeImpl* tree_impl) { |
27 return SolidColorLayerImpl::Create(tree_impl, id()); | 27 return SolidColorLayerImpl::Create(tree_impl, id()); |
28 } | 28 } |
29 | 29 |
30 void SolidColorLayerImpl::AppendSolidQuads( | 30 void SolidColorLayerImpl::AppendSolidQuads( |
31 RenderPass* render_pass, | 31 RenderPass* render_pass, |
32 const Occlusion& occlusion_in_layer_space, | 32 const Occlusion& occlusion_in_layer_space, |
33 SharedQuadState* shared_quad_state, | 33 SharedQuadState* shared_quad_state, |
34 const gfx::Rect& visible_layer_rect, | 34 const gfx::Rect& visible_layer_rect, |
35 SkColor color, | 35 SkColor color, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 AppendSolidQuads(render_pass, draw_properties().occlusion_in_content_space, | 77 AppendSolidQuads(render_pass, draw_properties().occlusion_in_content_space, |
78 shared_quad_state, gfx::Rect(bounds()), background_color(), | 78 shared_quad_state, gfx::Rect(bounds()), background_color(), |
79 append_quads_data); | 79 append_quads_data); |
80 } | 80 } |
81 | 81 |
82 const char* SolidColorLayerImpl::LayerTypeAsString() const { | 82 const char* SolidColorLayerImpl::LayerTypeAsString() const { |
83 return "cc::SolidColorLayerImpl"; | 83 return "cc::SolidColorLayerImpl"; |
84 } | 84 } |
85 | 85 |
86 } // namespace cc | 86 } // namespace cc |
OLD | NEW |