| 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/layers/quad_sink.h" | 10 #include "cc/layers/quad_sink.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 if (!ui_resource_id_ || draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) | 89 if (!ui_resource_id_ || draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) |
| 90 return false; | 90 return false; |
| 91 return LayerImpl::WillDraw(draw_mode, resource_provider); | 91 return LayerImpl::WillDraw(draw_mode, resource_provider); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void UIResourceLayerImpl::AppendQuads(QuadSink* quad_sink, | 94 void UIResourceLayerImpl::AppendQuads(QuadSink* quad_sink, |
| 95 AppendQuadsData* append_quads_data) { | 95 AppendQuadsData* append_quads_data) { |
| 96 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); | 96 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); |
| 97 PopulateSharedQuadState(shared_quad_state); | 97 PopulateSharedQuadState(shared_quad_state); |
| 98 | 98 |
| 99 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); | 99 AppendDebugBorderQuad( |
| 100 quad_sink, content_bounds(), shared_quad_state, append_quads_data); |
| 100 | 101 |
| 101 if (!ui_resource_id_) | 102 if (!ui_resource_id_) |
| 102 return; | 103 return; |
| 103 | 104 |
| 104 ResourceProvider::ResourceId resource = | 105 ResourceProvider::ResourceId resource = |
| 105 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_); | 106 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_); |
| 106 | 107 |
| 107 if (!resource) | 108 if (!resource) |
| 108 return; | 109 return; |
| 109 | 110 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 list->AppendDouble(vertex_opacity_[3]); | 154 list->AppendDouble(vertex_opacity_[3]); |
| 154 result->Set("VertexOpacity", list); | 155 result->Set("VertexOpacity", list); |
| 155 | 156 |
| 156 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release()); | 157 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release()); |
| 157 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release()); | 158 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release()); |
| 158 | 159 |
| 159 return result; | 160 return result; |
| 160 } | 161 } |
| 161 | 162 |
| 162 } // namespace cc | 163 } // namespace cc |
| OLD | NEW |