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

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

Issue 2032303004: cc : Add layer_list to LayerTreeImpl and build it for tests (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_perftest.cc ('k') | cc/layers/render_surface_impl_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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 host->CommitComplete(); 348 host->CommitComplete();
349 EXPECT_EQ(2, host->source_frame_number()); 349 EXPECT_EQ(2, host->source_frame_number());
350 350
351 host_impl.ActivateSyncTree(); 351 host_impl.ActivateSyncTree();
352 352
353 // By updating the draw proprties on the active tree, we will set the viewport 353 // By updating the draw proprties on the active tree, we will set the viewport
354 // rect for tile priorities to something non-empty. 354 // rect for tile priorities to something non-empty.
355 const bool can_use_lcd_text = false; 355 const bool can_use_lcd_text = false;
356 host_impl.active_tree()->property_trees()->needs_rebuild = true; 356 host_impl.active_tree()->property_trees()->needs_rebuild = true;
357 host_impl.active_tree()->BuildPropertyTreesForTesting(); 357 host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting();
358 host_impl.active_tree()->UpdateDrawProperties(can_use_lcd_text); 358 host_impl.active_tree()->UpdateDrawProperties(can_use_lcd_text);
359 359
360 layer->SetBounds(gfx::Size(11, 11)); 360 layer->SetBounds(gfx::Size(11, 11));
361 layer->SavePaintProperties(); 361 layer->SavePaintProperties();
362 362
363 host_impl.CreatePendingTree(); 363 host_impl.CreatePendingTree();
364 layer_impl = static_cast<FakePictureLayerImpl*>( 364 layer_impl = static_cast<FakePictureLayerImpl*>(
365 host_impl.pending_tree()->root_layer()); 365 host_impl.pending_tree()->root_layer());
366 366
367 // We should now have invalid contents and should therefore clear the 367 // We should now have invalid contents and should therefore clear the
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // Do a main frame, record the picture layers. The frame number has changed 467 // Do a main frame, record the picture layers. The frame number has changed
468 // non-monotonically. 468 // non-monotonically.
469 layer->SetNeedsDisplay(); 469 layer->SetNeedsDisplay();
470 host2->Composite(base::TimeTicks::Now()); 470 host2->Composite(base::TimeTicks::Now());
471 EXPECT_EQ(3, layer->update_count()); 471 EXPECT_EQ(3, layer->update_count());
472 EXPECT_EQ(1, host2->source_frame_number()); 472 EXPECT_EQ(1, host2->source_frame_number());
473 } 473 }
474 474
475 } // namespace 475 } // namespace
476 } // namespace cc 476 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_perftest.cc ('k') | cc/layers/render_surface_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698