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

Unified Diff: cc/base/tiling_data.h

Issue 2503303002: ps test.
Patch Set: rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/base/switches.cc ('k') | cc/base/tiling_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/tiling_data.h
diff --git a/cc/base/tiling_data.h b/cc/base/tiling_data.h
index 645193b5ada9499a3da0f6db4558ece41e2b1e71..c98d7b3f66d04af002b500d867e86eb66c9065f4 100644
--- a/cc/base/tiling_data.h
+++ b/cc/base/tiling_data.h
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "cc/base/cc_export.h"
#include "cc/base/index_rect.h"
+#include "cc/base/pyramid_sequence.h"
#include "cc/base/reverse_spiral_iterator.h"
#include "cc/base/spiral_iterator.h"
#include "ui/gfx/geometry/rect.h"
@@ -48,6 +49,10 @@ class CC_EXPORT TilingData {
// Return the tile index whose non-border texels include src_position.
int TileXIndexFromSrcCoord(int src_position) const;
int TileYIndexFromSrcCoord(int src_position) const;
+ // Return the absolute tile index, assuming tiling size to be infinite in all
+ // quadrants.
+ int TileAbsoluteXIndexFromSrcCoord(int src_position) const;
+ int TileAbsoluteYIndexFromSrcCoord(int src_position) const;
// Return the lowest tile index whose border texels include src_position.
int FirstBorderTileXIndexFromSrcCoord(int src_position) const;
int FirstBorderTileYIndexFromSrcCoord(int src_position) const;
@@ -56,6 +61,8 @@ class CC_EXPORT TilingData {
int LastBorderTileYIndexFromSrcCoord(int src_position) const;
// Return the tile indices around the given rect.
IndexRect TileAroundIndexRect(const gfx::Rect& center_rect) const;
+ // Return the absolute tile indices around the given rect.
+ IndexRect TileAroundAbsoluteIndexRect(const gfx::Rect& center_rect) const;
gfx::Rect ExpandRectIgnoringBordersToTileBounds(const gfx::Rect& rect) const;
gfx::Rect ExpandRectToTileBounds(const gfx::Rect& rect) const;
@@ -72,6 +79,9 @@ class CC_EXPORT TilingData {
// Difference between TileBound's and TileBoundWithBorder's origin().
gfx::Vector2d TextureOffset(int x_index, int y_index) const;
+ // Returns true if tiling-iterator is specified as pyramid-sequence.
+ static bool IsPyramidSequenceEnabled();
+
class CC_EXPORT BaseIterator {
public:
operator bool() const { return index_x_ != -1 && index_y_ != -1; }
@@ -139,11 +149,22 @@ class CC_EXPORT TilingData {
SpiralDifferenceIterator(const TilingData* tiling_data,
const gfx::Rect& consider_rect,
const gfx::Rect& ignore_rect,
- const gfx::Rect& center_rect);
+ const gfx::Rect& center_rect,
+ const bool use_pyramid_sequence);
+ SpiralDifferenceIterator(const SpiralDifferenceIterator& other);
+ SpiralDifferenceIterator(SpiralDifferenceIterator&& other);
+ ~SpiralDifferenceIterator();
+
+ SpiralDifferenceIterator& operator=(const SpiralDifferenceIterator& other);
+ SpiralDifferenceIterator& operator=(SpiralDifferenceIterator&& other);
+
SpiralDifferenceIterator& operator++();
private:
SpiralIterator spiral_iterator_;
+ bool use_pyramid_sequence_;
+ PyramidSequence pyramid_sequence_;
+ PyramidSequence::Iterator iterator_;
};
class CC_EXPORT ReverseSpiralDifferenceIterator
@@ -153,11 +174,25 @@ class CC_EXPORT TilingData {
ReverseSpiralDifferenceIterator(const TilingData* tiling_data,
const gfx::Rect& consider_rect,
const gfx::Rect& ignore_rect,
- const gfx::Rect& center_rect);
+ const gfx::Rect& center_rect,
+ const bool use_pyramid_sequence);
+ ReverseSpiralDifferenceIterator(
+ const ReverseSpiralDifferenceIterator& other);
+ ReverseSpiralDifferenceIterator(ReverseSpiralDifferenceIterator&& other);
+ ~ReverseSpiralDifferenceIterator();
+
+ ReverseSpiralDifferenceIterator& operator=(
+ const ReverseSpiralDifferenceIterator& other);
+ ReverseSpiralDifferenceIterator& operator=(
+ ReverseSpiralDifferenceIterator&& other);
+
ReverseSpiralDifferenceIterator& operator++();
private:
ReverseSpiralIterator reverse_spiral_iterator_;
+ bool use_pyramid_sequence_;
+ PyramidSequence pyramid_sequence_;
+ PyramidSequence::ReverseIterator reverse_iterator_;
};
private:
« no previous file with comments | « cc/base/switches.cc ('k') | cc/base/tiling_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698