| 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_IMPL_H_ | 5 #ifndef CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ | 6 #define CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 class Patch { | 98 class Patch { |
| 99 public: | 99 public: |
| 100 Patch(const gfx::Rect& image_rect, const gfx::Rect& layer_rect); | 100 Patch(const gfx::Rect& image_rect, const gfx::Rect& layer_rect); |
| 101 | 101 |
| 102 gfx::Rect image_rect; | 102 gfx::Rect image_rect; |
| 103 gfx::Rect layer_rect; | 103 gfx::Rect layer_rect; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 const char* LayerTypeAsString() const override; | 106 const char* LayerTypeAsString() const override; |
| 107 | 107 |
| 108 bool CanUseOcclusion(); |
| 108 void CheckGeometryLimitations(); | 109 void CheckGeometryLimitations(); |
| 109 | 110 |
| 110 std::vector<Patch> ComputeQuadsWithOcclusion() const; | 111 std::vector<Patch> ComputeQuadsWithOcclusion() const; |
| 111 std::vector<Patch> ComputeQuadsWithoutOcclusion() const; | 112 std::vector<Patch> ComputeQuadsWithoutOcclusion() const; |
| 112 | 113 |
| 113 // The transparent center region that shows the parent layer's contents in | 114 // The transparent center region that shows the parent layer's contents in |
| 114 // image space. | 115 // image space. |
| 115 gfx::Rect image_aperture_; | 116 gfx::Rect image_aperture_; |
| 116 | 117 |
| 117 // An inset border that the patches will be mapped to. | 118 // An inset border that the patches will be mapped to. |
| 118 gfx::Rect border_; | 119 gfx::Rect border_; |
| 119 | 120 |
| 120 bool fill_center_; | 121 bool fill_center_; |
| 121 | 122 |
| 122 bool nearest_neighbor_; | 123 bool nearest_neighbor_; |
| 123 | 124 |
| 124 gfx::Rect layer_occlusion_; | 125 gfx::Rect layer_occlusion_; |
| 125 | 126 |
| 126 DISALLOW_COPY_AND_ASSIGN(NinePatchLayerImpl); | 127 DISALLOW_COPY_AND_ASSIGN(NinePatchLayerImpl); |
| 127 }; | 128 }; |
| 128 | 129 |
| 129 } // namespace cc | 130 } // namespace cc |
| 130 | 131 |
| 131 #endif // CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ | 132 #endif // CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ |
| OLD | NEW |