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

Side by Side Diff: cc/base/tiling_data.h

Issue 505913003: cc: Remove and Create the correct tiles when resizing live tiles rect (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: livetiles: . Created 6 years, 3 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/base/tiling_data.cc » ('j') | cc/resources/picture_layer_tiling.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_BASE_TILING_DATA_H_ 5 #ifndef CC_BASE_TILING_DATA_H_
6 #define CC_BASE_TILING_DATA_H_ 6 #define CC_BASE_TILING_DATA_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 const gfx::Rect& consider_rect, 96 const gfx::Rect& consider_rect,
97 bool include_borders); 97 bool include_borders);
98 Iterator& operator++(); 98 Iterator& operator++();
99 99
100 private: 100 private:
101 int left_; 101 int left_;
102 int right_; 102 int right_;
103 int bottom_; 103 int bottom_;
104 }; 104 };
105 105
106 // Iterate through all indices whose bounds + border intersect with 106 // Iterate through all indices whose bounds (not including borders) intersect
107 // |consider| but which also do not intersect with |ignore|. 107 // with |consider| but which also do not intersect with |ignore|.
108 class CC_EXPORT DifferenceIterator : public BaseIterator { 108 class CC_EXPORT DifferenceIterator : public BaseIterator {
109 public: 109 public:
110 DifferenceIterator( 110 DifferenceIterator(const TilingData* tiling_data,
111 const TilingData* tiling_data, 111 const gfx::Rect& consider_rect,
112 const gfx::Rect& consider_rect, 112 const gfx::Rect& ignore_rect);
113 const gfx::Rect& ignore_rect);
114 DifferenceIterator& operator++(); 113 DifferenceIterator& operator++();
115 114
116 private: 115 private:
117 bool in_ignore_rect() const { 116 bool in_ignore_rect() const {
118 return index_x_ >= ignore_left_ && index_x_ <= ignore_right_ && 117 return index_x_ >= ignore_left_ && index_x_ <= ignore_right_ &&
119 index_y_ >= ignore_top_ && index_y_ <= ignore_bottom_; 118 index_y_ >= ignore_top_ && index_y_ <= ignore_bottom_;
120 } 119 }
121 120
122 int consider_left_; 121 int consider_left_;
123 int consider_top_; 122 int consider_top_;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 int border_texels_; 198 int border_texels_;
200 199
201 // These are computed values. 200 // These are computed values.
202 int num_tiles_x_; 201 int num_tiles_x_;
203 int num_tiles_y_; 202 int num_tiles_y_;
204 }; 203 };
205 204
206 } // namespace cc 205 } // namespace cc
207 206
208 #endif // CC_BASE_TILING_DATA_H_ 207 #endif // CC_BASE_TILING_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | cc/base/tiling_data.cc » ('j') | cc/resources/picture_layer_tiling.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698