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

Unified Diff: cc/resources/tiling_set_raster_queue_all.h

Issue 1126813002: cc: Pass priority rect information from iterators to tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/tiling_set_raster_queue_all.h
diff --git a/cc/resources/tiling_set_raster_queue_all.h b/cc/resources/tiling_set_raster_queue_all.h
index e210f2865e1ccff0cb2a9b159e125d4cd2eaa9f7..749b59c3e725fdc01cea0ac64010cea0a1a238cf 100644
--- a/cc/resources/tiling_set_raster_queue_all.h
+++ b/cc/resources/tiling_set_raster_queue_all.h
@@ -32,7 +32,8 @@ class CC_EXPORT TilingSetRasterQueueAll {
public:
OnePriorityRectIterator();
OnePriorityRectIterator(PictureLayerTiling* tiling,
- TilingData* tiling_data);
+ TilingData* tiling_data,
+ PictureLayerTiling::PriorityRect priority_rect);
bool done() const { return !tile_; }
Tile* operator*() const { return tile_; }
@@ -50,7 +51,9 @@ class CC_EXPORT TilingSetRasterQueueAll {
Tile* tile_;
PictureLayerTiling* tiling_;
+ const PictureLayerTiling* pending_twin_tiling_;
TilingData* tiling_data_;
+ PictureLayerTiling::PriorityRect priority_rect_;
};
// Iterates over visible rect only, left to right top to bottom order.
@@ -87,7 +90,6 @@ class CC_EXPORT TilingSetRasterQueueAll {
private:
TilingData::SpiralDifferenceIterator iterator_;
- gfx::Rect pending_visible_rect_;
};
// Iterates over soon border only, spiral around the visible rect.
@@ -101,7 +103,6 @@ class CC_EXPORT TilingSetRasterQueueAll {
private:
TilingData::SpiralDifferenceIterator iterator_;
- gfx::Rect pending_visible_rect_;
};
// Iterates over eventually rect only, spiral around the soon rect.
@@ -115,7 +116,6 @@ class CC_EXPORT TilingSetRasterQueueAll {
private:
TilingData::SpiralDifferenceIterator iterator_;
- gfx::Rect pending_visible_rect_;
};
// Iterates over all of the above phases in the following order: visible,
@@ -132,13 +132,13 @@ class CC_EXPORT TilingSetRasterQueueAll {
Tile* operator*() { return current_tile_; }
TilePriority::PriorityBin type() const {
switch (phase_) {
- case VISIBLE_RECT:
+ case Phase::VISIBLE_RECT:
return TilePriority::NOW;
- case PENDING_VISIBLE_RECT:
- case SKEWPORT_RECT:
- case SOON_BORDER_RECT:
+ case Phase::PENDING_VISIBLE_RECT:
+ case Phase::SKEWPORT_RECT:
+ case Phase::SOON_BORDER_RECT:
return TilePriority::SOON;
- case EVENTUALLY_RECT:
+ case Phase::EVENTUALLY_RECT:
return TilePriority::EVENTUALLY;
}
NOTREACHED();
@@ -153,13 +153,7 @@ class CC_EXPORT TilingSetRasterQueueAll {
// region that are not part of the current visible rect are all handled
// here. Note that when processing a pending tree, this rect is the same as
// the visible rect so no tiles are processed in this case.
- enum Phase {
- VISIBLE_RECT,
- PENDING_VISIBLE_RECT,
- SKEWPORT_RECT,
- SOON_BORDER_RECT,
- EVENTUALLY_RECT
- };
+ typedef PictureLayerTiling::PriorityRect Phase;
vmpstr 2015/05/05 18:04:02 nit: using Phase = PictureLayerTiling::PriorityRec
USE eero AT chromium.org 2015/05/06 12:05:20 I knew that such a statement exists but I could no
void AdvancePhase();

Powered by Google App Engine
This is Rietveld 408576698