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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2323423002: cc: Add SwapPromiseManager and SurfaceSequenceGenerator. (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
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 8515 matching lines...) Expand 10 before | Expand all | Expand 10 after
8526 EXPECT_TRUE(selection_after.start.visible()); 8526 EXPECT_TRUE(selection_after.start.visible());
8527 } 8527 }
8528 8528
8529 class SimpleSwapPromiseMonitor : public SwapPromiseMonitor { 8529 class SimpleSwapPromiseMonitor : public SwapPromiseMonitor {
8530 public: 8530 public:
8531 SimpleSwapPromiseMonitor(LayerTreeHost* layer_tree_host, 8531 SimpleSwapPromiseMonitor(LayerTreeHost* layer_tree_host,
8532 LayerTreeHostImpl* layer_tree_host_impl, 8532 LayerTreeHostImpl* layer_tree_host_impl,
8533 int* set_needs_commit_count, 8533 int* set_needs_commit_count,
8534 int* set_needs_redraw_count, 8534 int* set_needs_redraw_count,
8535 int* forward_to_main_count) 8535 int* forward_to_main_count)
8536 : SwapPromiseMonitor(layer_tree_host, layer_tree_host_impl), 8536 : SwapPromiseMonitor(
8537 (layer_tree_host ? layer_tree_host->GetSwapPromiseManager()
8538 : nullptr),
8539 layer_tree_host_impl),
8537 set_needs_commit_count_(set_needs_commit_count), 8540 set_needs_commit_count_(set_needs_commit_count),
8538 set_needs_redraw_count_(set_needs_redraw_count), 8541 set_needs_redraw_count_(set_needs_redraw_count),
8539 forward_to_main_count_(forward_to_main_count) {} 8542 forward_to_main_count_(forward_to_main_count) {}
8540 8543
8541 ~SimpleSwapPromiseMonitor() override {} 8544 ~SimpleSwapPromiseMonitor() override {}
8542 8545
8543 void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; } 8546 void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; }
8544 8547
8545 void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; } 8548 void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; }
8546 8549
(...skipping 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after
11172 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); 11175 EXPECT_TRUE(host_impl_->use_gpu_rasterization());
11173 11176
11174 // Re-initialize with a software output surface. 11177 // Re-initialize with a software output surface.
11175 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); 11178 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware();
11176 host_impl_->InitializeRenderer(output_surface_.get()); 11179 host_impl_->InitializeRenderer(output_surface_.get());
11177 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); 11180 EXPECT_FALSE(host_impl_->use_gpu_rasterization());
11178 } 11181 }
11179 11182
11180 } // namespace 11183 } // namespace
11181 } // namespace cc 11184 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698