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

Unified Diff: cc/layers/texture_layer.cc

Issue 53153006: Simplify rate limiting since it's main thread shared context only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 7 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/cc.gyp ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer.cc
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index 45a456e523719afd15adf422249bbb7f34ba950b..80bd4d4b59f39227974fcc6d599fb7b790ee5afe 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -50,7 +50,7 @@ TextureLayer::~TextureLayer() {
void TextureLayer::ClearClient() {
if (rate_limit_context_ && client_ && layer_tree_host())
- layer_tree_host()->StopRateLimiter(client_->Context3d());
+ layer_tree_host()->StopRateLimiter();
client_ = NULL;
if (uses_mailbox_)
SetTextureMailbox(TextureMailbox(), scoped_ptr<SingleReleaseCallback>());
@@ -114,7 +114,7 @@ void TextureLayer::SetBlendBackgroundColor(bool blend) {
void TextureLayer::SetRateLimitContext(bool rate_limit) {
if (!rate_limit && rate_limit_context_ && client_ && layer_tree_host())
- layer_tree_host()->StopRateLimiter(client_->Context3d());
+ layer_tree_host()->StopRateLimiter();
rate_limit_context_ = rate_limit;
}
@@ -178,7 +178,7 @@ void TextureLayer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) {
Layer::SetNeedsDisplayRect(dirty_rect);
if (rate_limit_context_ && client_ && layer_tree_host() && DrawsContent())
- layer_tree_host()->StartRateLimiter(client_->Context3d());
+ layer_tree_host()->StartRateLimiter();
}
void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) {
@@ -195,7 +195,7 @@ void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) {
SetNextCommitWaitsForActivation();
}
if (rate_limit_context_ && client_)
- layer_tree_host()->StopRateLimiter(client_->Context3d());
+ layer_tree_host()->StopRateLimiter();
}
// If we're removed from the tree, the TextureLayerImpl will be destroyed, and
// we will need to set the mailbox again on a new TextureLayerImpl the next
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698