| 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/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 4512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4523 virtual ~SimpleSwapPromiseMonitor() {} | 4523 virtual ~SimpleSwapPromiseMonitor() {} |
| 4524 | 4524 |
| 4525 virtual void OnSetNeedsCommitOnMain() OVERRIDE { | 4525 virtual void OnSetNeedsCommitOnMain() OVERRIDE { |
| 4526 (*set_needs_commit_count_)++; | 4526 (*set_needs_commit_count_)++; |
| 4527 } | 4527 } |
| 4528 | 4528 |
| 4529 virtual void OnSetNeedsRedrawOnImpl() OVERRIDE { | 4529 virtual void OnSetNeedsRedrawOnImpl() OVERRIDE { |
| 4530 (*set_needs_redraw_count_)++; | 4530 (*set_needs_redraw_count_)++; |
| 4531 } | 4531 } |
| 4532 | 4532 |
| 4533 virtual void OnForwardScrollUpdateToMainThreadOnImpl() OVERRIDE { |
| 4534 ADD_FAILURE() << "Should not get called on main thread."; |
| 4535 } |
| 4536 |
| 4533 private: | 4537 private: |
| 4534 int* set_needs_commit_count_; | 4538 int* set_needs_commit_count_; |
| 4535 int* set_needs_redraw_count_; | 4539 int* set_needs_redraw_count_; |
| 4536 }; | 4540 }; |
| 4537 | 4541 |
| 4538 class LayerTreeHostTestSimpleSwapPromiseMonitor : public LayerTreeHostTest { | 4542 class LayerTreeHostTestSimpleSwapPromiseMonitor : public LayerTreeHostTest { |
| 4539 public: | 4543 public: |
| 4540 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } | 4544 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } |
| 4541 | 4545 |
| 4542 virtual void WillBeginMainFrame() OVERRIDE { | 4546 virtual void WillBeginMainFrame() OVERRIDE { |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4894 const gfx::Size bounds_; | 4898 const gfx::Size bounds_; |
| 4895 FakeContentLayerClient client_; | 4899 FakeContentLayerClient client_; |
| 4896 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; | 4900 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; |
| 4897 scoped_refptr<FakePictureLayer> picture_layer_; | 4901 scoped_refptr<FakePictureLayer> picture_layer_; |
| 4898 Layer* child_layer_; | 4902 Layer* child_layer_; |
| 4899 }; | 4903 }; |
| 4900 | 4904 |
| 4901 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); | 4905 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); |
| 4902 | 4906 |
| 4903 } // namespace cc | 4907 } // namespace cc |
| OLD | NEW |