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

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

Issue 2067213002: cc: Implement tile iteration order based on pyramid sequence. [old] Base URL: https://chromium.googlesource.com/chromium/src.git@tiling_data_fix
Patch Set: rebase -> used for smoothness tests Created 3 years, 10 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 | « cc/base/pyramid_sequence_unittest.cc ('k') | cc/base/reverse_spiral_iterator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_REVERSE_SPIRAL_ITERATOR_H_ 5 #ifndef CC_BASE_REVERSE_SPIRAL_ITERATOR_H_
6 #define CC_BASE_REVERSE_SPIRAL_ITERATOR_H_ 6 #define CC_BASE_REVERSE_SPIRAL_ITERATOR_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/base/index_rect.h" 10 #include "cc/base/index_rect.h"
(...skipping 15 matching lines...) Expand all
26 // 3 │ 6│ 19│ 18│ 17│ 16│ 26 // 3 │ 6│ 19│ 18│ 17│ 16│
27 // ├───┼───┼───┼───┼───┤ 27 // ├───┼───┼───┼───┼───┤
28 // 4 │ 5│ 4│ 3│ 2│ 1│ 28 // 4 │ 5│ 4│ 3│ 2│ 1│
29 // └───┴───┴───┴───┴───┘ 29 // └───┴───┴───┴───┴───┘
30 class CC_EXPORT ReverseSpiralIterator { 30 class CC_EXPORT ReverseSpiralIterator {
31 public: 31 public:
32 ReverseSpiralIterator(); 32 ReverseSpiralIterator();
33 ReverseSpiralIterator(const IndexRect& around_index_rect, 33 ReverseSpiralIterator(const IndexRect& around_index_rect,
34 const IndexRect& consider_index_rect, 34 const IndexRect& consider_index_rect,
35 const IndexRect& ignore_index_rect); 35 const IndexRect& ignore_index_rect);
36 ReverseSpiralIterator(const ReverseSpiralIterator& other);
37 ReverseSpiralIterator(ReverseSpiralIterator&& other);
38 ~ReverseSpiralIterator();
36 39
37 ~ReverseSpiralIterator() = default; 40 ReverseSpiralIterator& operator=(const ReverseSpiralIterator& other);
41 ReverseSpiralIterator& operator=(ReverseSpiralIterator&& other);
38 42
39 operator bool() const; 43 operator bool() const;
40 ReverseSpiralIterator& operator++(); 44 ReverseSpiralIterator& operator++();
41 int index_x() const { return index_x_; } 45 int index_x() const { return index_x_; }
42 int index_y() const { return index_y_; } 46 int index_y() const { return index_y_; }
43 47
44 private: 48 private:
45 int current_step_count() const { 49 int current_step_count() const {
46 return (direction_ == UP || direction_ == DOWN) ? vertical_step_count_ 50 return (direction_ == UP || direction_ == DOWN) ? vertical_step_count_
47 : horizontal_step_count_; 51 : horizontal_step_count_;
(...skipping 14 matching lines...) Expand all
62 int delta_x_; 66 int delta_x_;
63 int delta_y_; 67 int delta_y_;
64 int current_step_; 68 int current_step_;
65 int horizontal_step_count_; 69 int horizontal_step_count_;
66 int vertical_step_count_; 70 int vertical_step_count_;
67 }; 71 };
68 72
69 } // namespace cc 73 } // namespace cc
70 74
71 #endif // CC_BASE_REVERSE_SPIRAL_ITERATOR_H_ 75 #endif // CC_BASE_REVERSE_SPIRAL_ITERATOR_H_
OLDNEW
« no previous file with comments | « cc/base/pyramid_sequence_unittest.cc ('k') | cc/base/reverse_spiral_iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698