| 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 #ifndef CC_LAYERS_NINE_PATCH_LAYER_H_ | 5 #ifndef CC_LAYERS_NINE_PATCH_LAYER_H_ |
| 6 #define CC_LAYERS_NINE_PATCH_LAYER_H_ | 6 #define CC_LAYERS_NINE_PATCH_LAYER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/layers/layer.h" | 12 #include "cc/layers/layer.h" |
| 13 #include "cc/layers/ui_resource_layer.h" | 13 #include "cc/layers/ui_resource_layer.h" |
| 14 #include "cc/resources/ui_resource_client.h" | 14 #include "cc/resources/ui_resource_client.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 class LayerTreeHost; | |
| 20 class ScopedUIResource; | |
| 21 | |
| 22 class CC_EXPORT NinePatchLayer : public UIResourceLayer { | 19 class CC_EXPORT NinePatchLayer : public UIResourceLayer { |
| 23 public: | 20 public: |
| 24 static scoped_refptr<NinePatchLayer> Create(); | 21 static scoped_refptr<NinePatchLayer> Create(); |
| 25 | 22 |
| 26 void PushPropertiesTo(LayerImpl* layer) override; | 23 void PushPropertiesTo(LayerImpl* layer) override; |
| 27 | 24 |
| 28 // |border| is the space around the center rectangular region in layer space | 25 // |border| is the space around the center rectangular region in layer space |
| 29 // (known as aperture in image space). |border.x()| and |border.y()| are the | 26 // (known as aperture in image space). |border.x()| and |border.y()| are the |
| 30 // size of the left and top boundary, respectively. | 27 // size of the left and top boundary, respectively. |
| 31 // |border.width()-border.x()| and |border.height()-border.y()| are the size | 28 // |border.width()-border.x()| and |border.height()-border.y()| are the size |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // The occluded region in layer space set by SetLayerOcclusion. It is | 60 // The occluded region in layer space set by SetLayerOcclusion. It is |
| 64 // usually larger than |image_aperture_|. | 61 // usually larger than |image_aperture_|. |
| 65 gfx::Rect layer_occlusion_; | 62 gfx::Rect layer_occlusion_; |
| 66 | 63 |
| 67 DISALLOW_COPY_AND_ASSIGN(NinePatchLayer); | 64 DISALLOW_COPY_AND_ASSIGN(NinePatchLayer); |
| 68 }; | 65 }; |
| 69 | 66 |
| 70 } // namespace cc | 67 } // namespace cc |
| 71 | 68 |
| 72 #endif // CC_LAYERS_NINE_PATCH_LAYER_H_ | 69 #endif // CC_LAYERS_NINE_PATCH_LAYER_H_ |
| OLD | NEW |