OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |