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

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

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 8369 matching lines...) Expand 10 before | Expand all | Expand 10 after
8380 int* forward_to_main_count) 8380 int* forward_to_main_count)
8381 : SwapPromiseMonitor(layer_tree_host, layer_tree_host_impl), 8381 : SwapPromiseMonitor(layer_tree_host, layer_tree_host_impl),
8382 set_needs_commit_count_(set_needs_commit_count), 8382 set_needs_commit_count_(set_needs_commit_count),
8383 set_needs_redraw_count_(set_needs_redraw_count), 8383 set_needs_redraw_count_(set_needs_redraw_count),
8384 forward_to_main_count_(forward_to_main_count) {} 8384 forward_to_main_count_(forward_to_main_count) {}
8385 8385
8386 ~SimpleSwapPromiseMonitor() override {} 8386 ~SimpleSwapPromiseMonitor() override {}
8387 8387
8388 void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; } 8388 void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; }
8389 8389
8390 void OnSetNeedsForcedRedrawOnMain() override {}
8391
8390 void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; } 8392 void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; }
8391 8393
8392 void OnForwardScrollUpdateToMainThreadOnImpl() override { 8394 void OnForwardScrollUpdateToMainThreadOnImpl() override {
8393 (*forward_to_main_count_)++; 8395 (*forward_to_main_count_)++;
8394 } 8396 }
8395 8397
8396 private: 8398 private:
8397 int* set_needs_commit_count_; 8399 int* set_needs_commit_count_;
8398 int* set_needs_redraw_count_; 8400 int* set_needs_redraw_count_;
8399 int* forward_to_main_count_; 8401 int* forward_to_main_count_;
(...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after
10854 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); 10856 EXPECT_TRUE(host_impl_->use_gpu_rasterization());
10855 10857
10856 // Re-initialize with a software output surface. 10858 // Re-initialize with a software output surface.
10857 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); 10859 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware();
10858 host_impl_->InitializeRenderer(output_surface_.get()); 10860 host_impl_->InitializeRenderer(output_surface_.get());
10859 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); 10861 EXPECT_FALSE(host_impl_->use_gpu_rasterization());
10860 } 10862 }
10861 10863
10862 } // namespace 10864 } // namespace
10863 } // namespace cc 10865 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698