Index: cc/trees/layer_tree_host_unittest.cc |
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc |
index 0102a10617605b86d1329bba60262884a8046fd9..015dcedad4f37d6171c5a17c424979720ffc1547 100644 |
--- a/cc/trees/layer_tree_host_unittest.cc |
+++ b/cc/trees/layer_tree_host_unittest.cc |
@@ -664,8 +664,6 @@ class LayerTreeHostTestAbortFrameWhenInvisible : public LayerTreeHostTest { |
} |
virtual void AfterTest() OVERRIDE {} |
- |
- private: |
}; |
MULTI_THREAD_TEST_F(LayerTreeHostTestAbortFrameWhenInvisible); |
@@ -4464,6 +4462,45 @@ class LayerTreeHostTestAbortEvictedTextures : public LayerTreeHostTest { |
// Commits can only be aborted when using the thread proxy. |
MULTI_THREAD_TEST_F(LayerTreeHostTestAbortEvictedTextures); |
+class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest { |
+ protected: |
+ virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { |
+ settings->impl_side_painting = true; |
+ } |
+ |
+ virtual void SetupTree() OVERRIDE { |
+ scoped_refptr<FakePictureLayer> root_layer = |
+ FakePictureLayer::Create(&client_); |
+ // 6000 * 6000 * 4bpp = 144MB |
+ root_layer->SetBounds(gfx::Size(6000, 6000)); |
+ root_layer->SetIsDrawable(true); |
+ |
+ layer_tree_host()->SetRootLayer(root_layer); |
+ LayerTreeHostTest::SetupTree(); |
+ } |
+ |
+ virtual void BeginTest() OVERRIDE { |
+ PostSetNeedsCommitToMainThread(); |
+ } |
+ |
+ virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
+ TestWebGraphicsContext3D* context = static_cast<TestWebGraphicsContext3D*>( |
+ impl->output_surface()->context_provider()->Context3d()); |
+ // The default MaxTransferBufferUsageBytes value is 64MB. |
danakj
2013/09/06 21:48:17
Can you assert this value somewhere int he test so
kaanb
2013/09/06 21:58:45
If I add a getter for to TileManager yes, but reve
danakj
2013/09/06 22:01:13
What I mean is the limit that the we're passing in
reveman
2013/09/06 22:28:27
+1
kaanb
2013/09/07 01:30:31
Done.
|
+ // Expect that we're using less than that. |
+ EXPECT_GT(64 * 1024 * 1024u, context->transfer_buffer_memory_used_bytes()); |
+ EndTest(); |
+ } |
+ |
+ virtual void AfterTest() OVERRIDE {} |
+ |
+ private: |
+ FakeContentLayerClient client_; |
+}; |
+ |
+// Impl-side painting is a multi-threaded compositor feature. |
+MULTI_THREAD_TEST_F(LayerTreeHostTestMaxTransferBufferUsageBytes); |
+ |
} // namespace |
} // namespace cc |