OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/animation/timing_function.h" | 10 #include "cc/animation/timing_function.h" |
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1809 virtual void BeginTest() OVERRIDE { | 1809 virtual void BeginTest() OVERRIDE { |
1810 layer_tree_host()->SetViewportSize(gfx::Size(10, 10)); | 1810 layer_tree_host()->SetViewportSize(gfx::Size(10, 10)); |
1811 layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10)); | 1811 layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10)); |
1812 | 1812 |
1813 PostSetNeedsCommitToMainThread(); | 1813 PostSetNeedsCommitToMainThread(); |
1814 } | 1814 } |
1815 | 1815 |
1816 virtual void DidCommit() OVERRIDE { | 1816 virtual void DidCommit() OVERRIDE { |
1817 if (num_draw_layers_ == 2) | 1817 if (num_draw_layers_ == 2) |
1818 return; | 1818 return; |
1819 layer_tree_host()->root_layer()->SetNeedsDisplay(); | 1819 layer_tree_host()->SetNeedsCommit(); |
1820 } | 1820 } |
1821 | 1821 |
1822 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 1822 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
1823 if (num_draw_layers_ == 1) | 1823 if (num_draw_layers_ == 1) |
1824 num_commit_complete_++; | 1824 num_commit_complete_++; |
1825 } | 1825 } |
1826 | 1826 |
1827 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 1827 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
1828 num_draw_layers_++; | 1828 num_draw_layers_++; |
1829 if (num_draw_layers_ == 2) | 1829 if (num_draw_layers_ == 2) |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3162 FakeContentLayerClient client_; | 3162 FakeContentLayerClient client_; |
3163 scoped_refptr<FakePictureLayer> layer_; | 3163 scoped_refptr<FakePictureLayer> layer_; |
3164 bool initialized_gl_; | 3164 bool initialized_gl_; |
3165 int num_draws_; | 3165 int num_draws_; |
3166 }; | 3166 }; |
3167 | 3167 |
3168 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); | 3168 MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); |
3169 | 3169 |
3170 } // namespace | 3170 } // namespace |
3171 } // namespace cc | 3171 } // namespace cc |
OLD | NEW |