| 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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 8592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8603 EXPECT_TRUE(selection_after.start.visible()); | 8603 EXPECT_TRUE(selection_after.start.visible()); |
| 8604 } | 8604 } |
| 8605 | 8605 |
| 8606 class SimpleSwapPromiseMonitor : public SwapPromiseMonitor { | 8606 class SimpleSwapPromiseMonitor : public SwapPromiseMonitor { |
| 8607 public: | 8607 public: |
| 8608 SimpleSwapPromiseMonitor(LayerTreeHost* layer_tree_host, | 8608 SimpleSwapPromiseMonitor(LayerTreeHost* layer_tree_host, |
| 8609 LayerTreeHostImpl* layer_tree_host_impl, | 8609 LayerTreeHostImpl* layer_tree_host_impl, |
| 8610 int* set_needs_commit_count, | 8610 int* set_needs_commit_count, |
| 8611 int* set_needs_redraw_count, | 8611 int* set_needs_redraw_count, |
| 8612 int* forward_to_main_count) | 8612 int* forward_to_main_count) |
| 8613 : SwapPromiseMonitor(layer_tree_host, layer_tree_host_impl), | 8613 : SwapPromiseMonitor( |
| 8614 (layer_tree_host ? layer_tree_host->GetSwapPromiseManager() |
| 8615 : nullptr), |
| 8616 layer_tree_host_impl), |
| 8614 set_needs_commit_count_(set_needs_commit_count), | 8617 set_needs_commit_count_(set_needs_commit_count), |
| 8615 set_needs_redraw_count_(set_needs_redraw_count), | 8618 set_needs_redraw_count_(set_needs_redraw_count), |
| 8616 forward_to_main_count_(forward_to_main_count) {} | 8619 forward_to_main_count_(forward_to_main_count) {} |
| 8617 | 8620 |
| 8618 ~SimpleSwapPromiseMonitor() override {} | 8621 ~SimpleSwapPromiseMonitor() override {} |
| 8619 | 8622 |
| 8620 void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; } | 8623 void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; } |
| 8621 | 8624 |
| 8622 void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; } | 8625 void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; } |
| 8623 | 8626 |
| (...skipping 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11249 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); | 11252 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); |
| 11250 | 11253 |
| 11251 // Re-initialize with a software output surface. | 11254 // Re-initialize with a software output surface. |
| 11252 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); | 11255 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); |
| 11253 host_impl_->InitializeRenderer(output_surface_.get()); | 11256 host_impl_->InitializeRenderer(output_surface_.get()); |
| 11254 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); | 11257 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); |
| 11255 } | 11258 } |
| 11256 | 11259 |
| 11257 } // namespace | 11260 } // namespace |
| 11258 } // namespace cc | 11261 } // namespace cc |
| OLD | NEW |