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" |
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 NinePatchLayerImpl::NinePatchLayerImpl(LayerTreeImpl* tree_impl, int id) | 17 NinePatchLayerImpl::NinePatchLayerImpl(LayerTreeImpl* tree_impl, int id) |
18 : UIResourceLayerImpl(tree_impl, id), | 18 : UIResourceLayerImpl(tree_impl, id), |
19 fill_center_(false) {} | 19 fill_center_(false) {} |
20 | 20 |
21 NinePatchLayerImpl::~NinePatchLayerImpl() {} | 21 NinePatchLayerImpl::~NinePatchLayerImpl() {} |
22 | 22 |
23 scoped_ptr<LayerImpl> NinePatchLayerImpl::CreateLayerImpl( | 23 scoped_ptr<LayerImpl> NinePatchLayerImpl::CreateLayerImpl( |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 result->Set("ImageBounds", list); | 397 result->Set("ImageBounds", list); |
398 | 398 |
399 result->Set("Border", MathUtil::AsValue(border_).release()); | 399 result->Set("Border", MathUtil::AsValue(border_).release()); |
400 | 400 |
401 result->SetBoolean("FillCenter", fill_center_); | 401 result->SetBoolean("FillCenter", fill_center_); |
402 | 402 |
403 return result; | 403 return result; |
404 } | 404 } |
405 | 405 |
406 } // namespace cc | 406 } // namespace cc |
OLD | NEW |