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

Unified Diff: cc/layers/texture_layer_unittest.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/layers/texture_layer.cc ('k') | cc/scheduler/rate_limiter.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 1ee8dfba34d4379ab38a84b1f58b66d68a189c8b..9c999fc5405ed3b15717c92cde9cfaf7581c135e 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -51,8 +51,8 @@ class MockLayerTreeHost : public LayerTreeHost {
MOCK_METHOD0(AcquireLayerTextures, void());
MOCK_METHOD0(SetNeedsCommit, void());
MOCK_METHOD0(SetNeedsUpdateLayers, void());
- MOCK_METHOD1(StartRateLimiter, void(WebKit::WebGraphicsContext3D* context));
- MOCK_METHOD1(StopRateLimiter, void(WebKit::WebGraphicsContext3D* context));
+ MOCK_METHOD0(StartRateLimiter, void());
+ MOCK_METHOD0(StopRateLimiter, void());
};
class TextureLayerTest : public testing::Test {
@@ -278,23 +278,23 @@ TEST_F(TextureLayerTest, RateLimiter) {
layer_tree_host_->SetRootLayer(test_layer);
// Don't rate limit until we invalidate.
- EXPECT_CALL(*layer_tree_host_, StartRateLimiter(_)).Times(0);
+ 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(client.Context3d()));
+ 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(client.Context3d()));
+ 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(client.Context3d()));
+ EXPECT_CALL(*layer_tree_host_, StopRateLimiter());
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
test_layer->ClearClient();
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
@@ -306,14 +306,14 @@ TEST_F(TextureLayerTest, RateLimiter) {
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);
+ EXPECT_CALL(*layer_tree_host_, StartRateLimiter()).Times(0);
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
- EXPECT_CALL(*layer_tree_host_, StartRateLimiter(client.Context3d()));
+ 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(client.Context3d()));
+ EXPECT_CALL(*layer_tree_host_, StopRateLimiter());
layer_tree_host_->SetRootLayer(NULL);
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
}
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | cc/scheduler/rate_limiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698