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

Side by Side Diff: cc/resources/tile.h

Issue 671653005: SetNeedsRedraw directly when updating a visible tile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pinchblurmerge-test: addcomment Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/resources/tile_manager.h » ('j') | cc/resources/tile_manager.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_RESOURCES_TILE_H_ 5 #ifndef CC_RESOURCES_TILE_H_
6 #define CC_RESOURCES_TILE_H_ 6 #define CC_RESOURCES_TILE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "cc/base/ref_counted_managed.h" 9 #include "cc/base/ref_counted_managed.h"
10 #include "cc/resources/managed_tile_state.h" 10 #include "cc/resources/managed_tile_state.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // TODO(vmpstr): Move this to the iterators. 59 // TODO(vmpstr): Move this to the iterators.
60 void set_is_occluded(WhichTree tree, bool is_occluded) { 60 void set_is_occluded(WhichTree tree, bool is_occluded) {
61 is_occluded_[tree] = is_occluded; 61 is_occluded_[tree] = is_occluded;
62 } 62 }
63 63
64 bool is_occluded(WhichTree tree) const { return is_occluded_[tree]; } 64 bool is_occluded(WhichTree tree) const { return is_occluded_[tree]; }
65 65
66 void set_shared(bool is_shared) { is_shared_ = is_shared; } 66 void set_shared(bool is_shared) { is_shared_ = is_shared; }
67 bool is_shared() const { return is_shared_; } 67 bool is_shared() const { return is_shared_; }
68 68
69 bool is_active_and_visible_priority() const {
70 return priority(ACTIVE_TREE).distance_to_visible == 0.f;
71 }
72
69 bool is_occluded_for_tree_priority(TreePriority tree_priority) const { 73 bool is_occluded_for_tree_priority(TreePriority tree_priority) const {
70 switch (tree_priority) { 74 switch (tree_priority) {
71 case SMOOTHNESS_TAKES_PRIORITY: 75 case SMOOTHNESS_TAKES_PRIORITY:
72 return is_occluded_[ACTIVE_TREE]; 76 return is_occluded_[ACTIVE_TREE];
73 case NEW_CONTENT_TAKES_PRIORITY: 77 case NEW_CONTENT_TAKES_PRIORITY:
74 return is_occluded_[PENDING_TREE]; 78 return is_occluded_[PENDING_TREE];
75 case SAME_PRIORITY_FOR_BOTH_TREES: 79 case SAME_PRIORITY_FOR_BOTH_TREES:
76 return is_occluded_[ACTIVE_TREE] && is_occluded_[PENDING_TREE]; 80 return is_occluded_[ACTIVE_TREE] && is_occluded_[PENDING_TREE];
77 default: 81 default:
78 NOTREACHED(); 82 NOTREACHED();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 181
178 Id id_; 182 Id id_;
179 static Id s_next_id_; 183 static Id s_next_id_;
180 184
181 DISALLOW_COPY_AND_ASSIGN(Tile); 185 DISALLOW_COPY_AND_ASSIGN(Tile);
182 }; 186 };
183 187
184 } // namespace cc 188 } // namespace cc
185 189
186 #endif // CC_RESOURCES_TILE_H_ 190 #endif // CC_RESOURCES_TILE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile_manager.h » ('j') | cc/resources/tile_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698