| 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 #include "cc/layers/ui_resource_layer_impl.h" | 5 #include "cc/layers/ui_resource_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/quads/texture_draw_quad.h" | 10 #include "cc/quads/texture_draw_quad.h" |
| 11 #include "cc/trees/layer_tree_impl.h" | 11 #include "cc/trees/layer_tree_impl.h" |
| 12 #include "cc/trees/occlusion.h" | 12 #include "cc/trees/occlusion.h" |
| 13 #include "ui/gfx/rect_f.h" | 13 #include "ui/gfx/geometry/rect_f.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 UIResourceLayerImpl::UIResourceLayerImpl(LayerTreeImpl* tree_impl, int id) | 17 UIResourceLayerImpl::UIResourceLayerImpl(LayerTreeImpl* tree_impl, int id) |
| 18 : LayerImpl(tree_impl, id), | 18 : LayerImpl(tree_impl, id), |
| 19 ui_resource_id_(0), | 19 ui_resource_id_(0), |
| 20 uv_top_left_(0.f, 0.f), | 20 uv_top_left_(0.f, 0.f), |
| 21 uv_bottom_right_(1.f, 1.f) { | 21 uv_bottom_right_(1.f, 1.f) { |
| 22 vertex_opacity_[0] = 1.0f; | 22 vertex_opacity_[0] = 1.0f; |
| 23 vertex_opacity_[1] = 1.0f; | 23 vertex_opacity_[1] = 1.0f; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 list->AppendDouble(vertex_opacity_[3]); | 157 list->AppendDouble(vertex_opacity_[3]); |
| 158 result->Set("VertexOpacity", list); | 158 result->Set("VertexOpacity", list); |
| 159 | 159 |
| 160 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release()); | 160 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release()); |
| 161 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release()); | 161 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release()); |
| 162 | 162 |
| 163 return result; | 163 return result; |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace cc | 166 } // namespace cc |
| OLD | NEW |