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

Side by Side Diff: cc/layers/picture_layer_unittest.cc

Issue 2051013002: cc : Push layer lists instead of layer tree at commit and activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 layer_tree_settings.image_decode_tasks_enabled = true; 333 layer_tree_settings.image_decode_tasks_enabled = true;
334 FakeLayerTreeHostImpl host_impl(layer_tree_settings, 334 FakeLayerTreeHostImpl host_impl(layer_tree_settings,
335 &impl_task_runner_provider, 335 &impl_task_runner_provider,
336 &shared_bitmap_manager, &task_graph_runner); 336 &shared_bitmap_manager, &task_graph_runner);
337 host_impl.SetVisible(true); 337 host_impl.SetVisible(true);
338 EXPECT_TRUE(host_impl.InitializeRenderer(output_surface.get())); 338 EXPECT_TRUE(host_impl.InitializeRenderer(output_surface.get()));
339 339
340 host_impl.CreatePendingTree(); 340 host_impl.CreatePendingTree();
341 host_impl.pending_tree()->SetRootLayer( 341 host_impl.pending_tree()->SetRootLayer(
342 FakePictureLayerImpl::Create(host_impl.pending_tree(), 1)); 342 FakePictureLayerImpl::Create(host_impl.pending_tree(), 1));
343 host_impl.pending_tree()->BuildLayerListForTesting();
343 344
344 FakePictureLayerImpl* layer_impl = static_cast<FakePictureLayerImpl*>( 345 FakePictureLayerImpl* layer_impl = static_cast<FakePictureLayerImpl*>(
345 host_impl.pending_tree()->root_layer()); 346 host_impl.pending_tree()->root_layer());
346 347
347 layer->PushPropertiesTo(layer_impl); 348 layer->PushPropertiesTo(layer_impl);
348 349
349 host->CommitComplete(); 350 host->CommitComplete();
350 EXPECT_EQ(2, host->source_frame_number()); 351 EXPECT_EQ(2, host->source_frame_number());
351 352
352 host_impl.ActivateSyncTree(); 353 host_impl.ActivateSyncTree();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // Do a main frame, record the picture layers. The frame number has changed 479 // Do a main frame, record the picture layers. The frame number has changed
479 // non-monotonically. 480 // non-monotonically.
480 layer->SetNeedsDisplay(); 481 layer->SetNeedsDisplay();
481 host2->Composite(base::TimeTicks::Now()); 482 host2->Composite(base::TimeTicks::Now());
482 EXPECT_EQ(3, layer->update_count()); 483 EXPECT_EQ(3, layer->update_count());
483 EXPECT_EQ(1, host2->source_frame_number()); 484 EXPECT_EQ(1, host2->source_frame_number());
484 } 485 }
485 486
486 } // namespace 487 } // namespace
487 } // namespace cc 488 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698