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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 151093005: cc: Update Main RendererCapabilities on DeferredInitialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: UpdateRendererCapabilitiesOnImplThread in CreateAndSetRenderer Created 6 years, 10 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_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index eb81d5b8e8a200dfb9e353a878cca21e998877a2..5eb9a19f05defd51dbd0c314576a19e601a538df 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -2999,6 +2999,7 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
virtual void SetupTree() OVERRIDE {
layer_ = FakePictureLayer::Create(&client_);
+ layer_->reset_renderer_capabilities_changed_count();
// Force commits to not be aborted so new frames get drawn, otherwise
// the renderer gets deferred initialized but nothing new needs drawing.
layer_->set_always_update_resources(true);
@@ -3015,9 +3016,6 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
OVERRIDE {
- scoped_ptr<TestWebGraphicsContext3D> context3d(
- TestWebGraphicsContext3D::Create());
-
return FakeOutputSurface::CreateDeferredGL(
scoped_ptr<SoftwareOutputDevice>(new SoftwareOutputDevice));
}
@@ -3081,6 +3079,9 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
virtual void AfterTest() OVERRIDE {
EXPECT_TRUE(did_initialize_gl_);
EXPECT_TRUE(did_release_gl_);
+ // Renderer capabilities changed one for first initialization,
+ // once for DeferredInitialize, and once for ReleaseGL.
+ EXPECT_EQ(3u, layer_->renderer_capabilities_changed_count());
}
private:

Powered by Google App Engine
This is Rietveld 408576698