| 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 "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void SetVertexOpacity(const float vertex_opacity[4]); | 42 void SetVertexOpacity(const float vertex_opacity[4]); |
| 43 | 43 |
| 44 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 44 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
| 45 void PushPropertiesTo(LayerImpl* layer) override; | 45 void PushPropertiesTo(LayerImpl* layer) override; |
| 46 | 46 |
| 47 bool WillDraw(DrawMode draw_mode, | 47 bool WillDraw(DrawMode draw_mode, |
| 48 ResourceProvider* resource_provider) override; | 48 ResourceProvider* resource_provider) override; |
| 49 void AppendQuads(RenderPass* render_pass, | 49 void AppendQuads(RenderPass* render_pass, |
| 50 AppendQuadsData* append_quads_data) override; | 50 AppendQuadsData* append_quads_data) override; |
| 51 | 51 |
| 52 std::unique_ptr<base::DictionaryValue> LayerTreeAsJson() const override; | 52 std::unique_ptr<base::DictionaryValue> LayerTreeAsJson() override; |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 UIResourceLayerImpl(LayerTreeImpl* tree_impl, int id); | 55 UIResourceLayerImpl(LayerTreeImpl* tree_impl, int id); |
| 56 | 56 |
| 57 // The size of the resource bitmap in pixels. | 57 // The size of the resource bitmap in pixels. |
| 58 gfx::Size image_bounds_; | 58 gfx::Size image_bounds_; |
| 59 | 59 |
| 60 UIResourceId ui_resource_id_; | 60 UIResourceId ui_resource_id_; |
| 61 | 61 |
| 62 gfx::PointF uv_top_left_; | 62 gfx::PointF uv_top_left_; |
| 63 gfx::PointF uv_bottom_right_; | 63 gfx::PointF uv_bottom_right_; |
| 64 float vertex_opacity_[4]; | 64 float vertex_opacity_[4]; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 const char* LayerTypeAsString() const override; | 67 const char* LayerTypeAsString() const override; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(UIResourceLayerImpl); | 69 DISALLOW_COPY_AND_ASSIGN(UIResourceLayerImpl); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace cc | 72 } // namespace cc |
| 73 | 73 |
| 74 #endif // CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ | 74 #endif // CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ |
| OLD | NEW |