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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 12642010: Implement on demand quad rasterization for PicturePiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes, adding unit tests. Created 7 years, 9 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
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index ad27935e03ccabc9e832a23307984086f88205a0..6ab35a36881a98e37c738e47d297129135b2b2a8 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -2641,7 +2641,8 @@ TEST_F(LayerTreeHostImplTest, layersFreeTextures)
m_hostImpl->active_tree()->SetRootLayer(rootLayer.Pass());
- EXPECT_EQ(0u, context3d->NumTextures());
+ // An auxiliary texture is created for on-demand rasterization.
+ EXPECT_EQ(1u, context3d->NumTextures());
LayerTreeHostImpl::FrameData frame;
EXPECT_TRUE(m_hostImpl->PrepareToDraw(&frame));
@@ -2649,12 +2650,12 @@ TEST_F(LayerTreeHostImplTest, layersFreeTextures)
m_hostImpl->DidDrawAllLayers(frame);
m_hostImpl->SwapBuffers();
- EXPECT_GT(context3d->NumTextures(), 0u);
+ EXPECT_GT(context3d->NumTextures(), 1u);
// Kill the layer tree.
m_hostImpl->active_tree()->SetRootLayer(LayerImpl::Create(m_hostImpl->active_tree(), 100));
// There should be no textures left in use after.
- EXPECT_EQ(0u, context3d->NumTextures());
+ EXPECT_EQ(1u, context3d->NumTextures());
}
class MockDrawQuadsToFillScreenContext : public TestWebGraphicsContext3D {

Powered by Google App Engine
This is Rietveld 408576698