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

Unified Diff: cc/resources/tile.h

Issue 367833003: cc: Start using raster/eviction iterators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « cc/resources/prioritized_tile_set_unittest.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile.h
diff --git a/cc/resources/tile.h b/cc/resources/tile.h
index ec0b9a276840ec4c6bab50d3fe758d26bd2346e7..e61b5c5defaf8b45be300053ef79009452e14dbd 100644
--- a/cc/resources/tile.h
+++ b/cc/resources/tile.h
@@ -58,8 +58,11 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
priority_[PENDING_TREE]);
}
- void SetPriority(WhichTree tree, const TilePriority& priority);
+ void SetPriority(WhichTree tree, const TilePriority& priority) {
+ priority_[tree] = priority;
+ }
+ // TODO(vmpstr): Move this to the iterators.
void set_is_occluded(WhichTree tree, bool is_occluded) {
is_occluded_[tree] = is_occluded;
}
@@ -83,10 +86,10 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
}
}
- void MarkRequiredForActivation();
-
- bool required_for_activation() const {
- return priority_[PENDING_TREE].required_for_activation;
+ // TODO(vmpstr): Move this to the iterators.
+ bool required_for_activation() const { return required_for_activation_; }
+ void set_required_for_activation(bool is_required) {
+ required_for_activation_ = is_required;
}
bool use_picture_analysis() const {
@@ -94,6 +97,11 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
}
bool HasResources() const { return managed_state_.draw_info.has_resource(); }
+ bool NeedsRaster() const {
+ return managed_state_.draw_info.mode() ==
+ ManagedTileState::DrawInfo::PICTURE_PILE_MODE ||
+ !managed_state_.draw_info.IsReadyToDraw();
+ }
void AsValueInto(base::debug::TracedValue* dict) const;
@@ -126,6 +134,13 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
gfx::Size size() const { return size_; }
+ void set_tiling_index(int i, int j) {
+ tiling_i_index_ = i;
+ tiling_j_index_ = j;
+ }
+ int tiling_i_index() const { return tiling_i_index_; }
+ int tiling_j_index() const { return tiling_j_index_; }
+
private:
friend class TileManager;
friend class PrioritizedTileSet;
@@ -162,6 +177,9 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
int source_frame_number_;
int flags_;
bool is_shared_;
+ int tiling_i_index_;
+ int tiling_j_index_;
+ bool required_for_activation_;
Id id_;
static Id s_next_id_;
« no previous file with comments | « cc/resources/prioritized_tile_set_unittest.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698