Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: cc/layers/nine_patch_layer_impl.h

Issue 1937493002: cc: 9patch: fix shadow scaling issue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix invalid occlusion area Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/nine_patch_layer_impl.cc » ('j') | cc/layers/nine_patch_layer_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/nine_patch_layer_impl.cc » ('j') | cc/layers/nine_patch_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698