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

Unified Diff: cc/layers/texture_layer_unittest.cc

Issue 1341423006: Removing GL context rate limiting feature and related wrappers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed mojo autogens Created 5 years, 3 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/layers/texture_layer.cc ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer_unittest.cc
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 82894299f7ae249248d7bbc47b825bea4930cde6..22962a744a1bf5795251fea65f2db6d2194e96c7 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -236,55 +236,6 @@ TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) {
EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendBackgroundColor(true));
}
-TEST_F(TextureLayerTest, RateLimiter) {
- FakeTextureLayerClient client;
- scoped_refptr<TextureLayer> test_layer =
- TextureLayer::CreateForMailbox(layer_settings_, &client);
- test_layer->SetIsDrawable(true);
- EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
- layer_tree_host_->SetRootLayer(test_layer);
-
- // Don't rate limit until we invalidate.
- EXPECT_CALL(*layer_tree_host_, StartRateLimiter()).Times(0);
- test_layer->SetRateLimitContext(true);
- Mock::VerifyAndClearExpectations(layer_tree_host_.get());
-
- // Do rate limit after we invalidate.
- EXPECT_CALL(*layer_tree_host_, StartRateLimiter());
- test_layer->SetNeedsDisplay();
- Mock::VerifyAndClearExpectations(layer_tree_host_.get());
-
- // Stop rate limiter when we don't want it any more.
- EXPECT_CALL(*layer_tree_host_, StopRateLimiter());
- test_layer->SetRateLimitContext(false);
- Mock::VerifyAndClearExpectations(layer_tree_host_.get());
-
- // Or we clear the client.
- test_layer->SetRateLimitContext(true);
- EXPECT_CALL(*layer_tree_host_, StopRateLimiter());
- EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
- test_layer->ClearClient();
- Mock::VerifyAndClearExpectations(layer_tree_host_.get());
-
- // Reset to a layer with a client, that started the rate limiter.
- test_layer = TextureLayer::CreateForMailbox(layer_settings_, &client);
- test_layer->SetIsDrawable(true);
- test_layer->SetRateLimitContext(true);
- EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
- layer_tree_host_->SetRootLayer(test_layer);
- EXPECT_CALL(*layer_tree_host_, StartRateLimiter()).Times(0);
- Mock::VerifyAndClearExpectations(layer_tree_host_.get());
- EXPECT_CALL(*layer_tree_host_, StartRateLimiter());
- test_layer->SetNeedsDisplay();
- Mock::VerifyAndClearExpectations(layer_tree_host_.get());
-
- // Stop rate limiter when we're removed from the tree.
- EXPECT_CALL(*layer_tree_host_, StopRateLimiter());
- EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(1);
- layer_tree_host_->SetRootLayer(nullptr);
- Mock::VerifyAndClearExpectations(layer_tree_host_.get());
-}
-
class TestMailboxHolder : public TextureLayer::TextureMailboxHolder {
public:
using TextureLayer::TextureMailboxHolder::Create;
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698