OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ |
6 #define CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 27 matching lines...) Loading... |
38 // Sets an opacity value per vertex. It will be multiplied by the layer | 38 // Sets an opacity value per vertex. It will be multiplied by the layer |
39 // opacity value. | 39 // opacity value. |
40 void SetVertexOpacity(const float vertex_opacity[4]); | 40 void SetVertexOpacity(const float vertex_opacity[4]); |
41 | 41 |
42 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 42 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
43 void PushPropertiesTo(LayerImpl* layer) override; | 43 void PushPropertiesTo(LayerImpl* layer) override; |
44 | 44 |
45 bool WillDraw(DrawMode draw_mode, | 45 bool WillDraw(DrawMode draw_mode, |
46 ResourceProvider* resource_provider) override; | 46 ResourceProvider* resource_provider) override; |
47 void AppendQuads(RenderPass* render_pass, | 47 void AppendQuads(RenderPass* render_pass, |
48 const Occlusion& occlusion_in_content_space, | |
49 AppendQuadsData* append_quads_data) override; | 48 AppendQuadsData* append_quads_data) override; |
50 | 49 |
51 base::DictionaryValue* LayerTreeAsJson() const override; | 50 base::DictionaryValue* LayerTreeAsJson() const override; |
52 | 51 |
53 protected: | 52 protected: |
54 UIResourceLayerImpl(LayerTreeImpl* tree_impl, int id); | 53 UIResourceLayerImpl(LayerTreeImpl* tree_impl, int id); |
55 | 54 |
56 // The size of the resource bitmap in pixels. | 55 // The size of the resource bitmap in pixels. |
57 gfx::Size image_bounds_; | 56 gfx::Size image_bounds_; |
58 | 57 |
59 UIResourceId ui_resource_id_; | 58 UIResourceId ui_resource_id_; |
60 | 59 |
61 gfx::PointF uv_top_left_; | 60 gfx::PointF uv_top_left_; |
62 gfx::PointF uv_bottom_right_; | 61 gfx::PointF uv_bottom_right_; |
63 float vertex_opacity_[4]; | 62 float vertex_opacity_[4]; |
64 | 63 |
65 private: | 64 private: |
66 const char* LayerTypeAsString() const override; | 65 const char* LayerTypeAsString() const override; |
67 | 66 |
68 DISALLOW_COPY_AND_ASSIGN(UIResourceLayerImpl); | 67 DISALLOW_COPY_AND_ASSIGN(UIResourceLayerImpl); |
69 }; | 68 }; |
70 | 69 |
71 } // namespace cc | 70 } // namespace cc |
72 | 71 |
73 #endif // CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ | 72 #endif // CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ |
OLD | NEW |