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/nine_patch_layer_impl.h" | 5 #include "cc/layers/nine_patch_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" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 SharedQuadState* shared_quad_state = | 87 SharedQuadState* shared_quad_state = |
88 render_pass->CreateAndAppendSharedQuadState(); | 88 render_pass->CreateAndAppendSharedQuadState(); |
89 PopulateSharedQuadState(shared_quad_state); | 89 PopulateSharedQuadState(shared_quad_state); |
90 | 90 |
91 AppendDebugBorderQuad( | 91 AppendDebugBorderQuad( |
92 render_pass, content_bounds(), shared_quad_state, append_quads_data); | 92 render_pass, content_bounds(), shared_quad_state, append_quads_data); |
93 | 93 |
94 if (!ui_resource_id_) | 94 if (!ui_resource_id_) |
95 return; | 95 return; |
96 | 96 |
97 ResourceProvider::ResourceId resource = | 97 ResourceId resource = |
98 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_); | 98 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_); |
99 | 99 |
100 if (!resource) | 100 if (!resource) |
101 return; | 101 return; |
102 | 102 |
103 static const bool flipped = false; | 103 static const bool flipped = false; |
104 static const bool nearest_neighbor = false; | 104 static const bool nearest_neighbor = false; |
105 static const bool premultiplied_alpha = true; | 105 static const bool premultiplied_alpha = true; |
106 | 106 |
107 DCHECK(!bounds().IsEmpty()); | 107 DCHECK(!bounds().IsEmpty()); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 result->Set("ImageBounds", list); | 433 result->Set("ImageBounds", list); |
434 | 434 |
435 result->Set("Border", MathUtil::AsValue(border_).release()); | 435 result->Set("Border", MathUtil::AsValue(border_).release()); |
436 | 436 |
437 result->SetBoolean("FillCenter", fill_center_); | 437 result->SetBoolean("FillCenter", fill_center_); |
438 | 438 |
439 return result; | 439 return result; |
440 } | 440 } |
441 | 441 |
442 } // namespace cc | 442 } // namespace cc |
OLD | NEW |