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

Side by Side Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 2270573002: cc: Get rid of LayerTreeHost::output_surface_lost_ state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-caps
Patch Set: lth-outputsurface-lost: android-build-and-earlyout-sooner 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
« no previous file with comments | « cc/debug/micro_benchmark_controller_unittest.cc ('k') | cc/test/fake_layer_tree_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <unordered_map> 7 #include <unordered_map>
8 8
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "cc/animation/animation_host.h" 10 #include "cc/animation/animation_host.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 params.settings = &layer_tree_settings_; 118 params.settings = &layer_tree_settings_;
119 params.task_graph_runner = &task_graph_runner_; 119 params.task_graph_runner = &task_graph_runner_;
120 params.animation_host = 120 params.animation_host =
121 AnimationHost::CreateForTesting(ThreadInstance::MAIN); 121 AnimationHost::CreateForTesting(ThreadInstance::MAIN);
122 122
123 layer_tree_host_.reset( 123 layer_tree_host_.reset(
124 new FakeResourceTrackingLayerTreeHost(&fake_client_, &params)); 124 new FakeResourceTrackingLayerTreeHost(&fake_client_, &params));
125 layer_tree_ = layer_tree_host_->GetLayerTree(); 125 layer_tree_ = layer_tree_host_->GetLayerTree();
126 layer_tree_host_->SetVisible(true); 126 layer_tree_host_->SetVisible(true);
127 fake_client_.SetLayerTreeHost(layer_tree_host_.get()); 127 fake_client_.SetLayerTreeHost(layer_tree_host_.get());
128 // Force output surface creation for renderer capabilities.
129 layer_tree_host_->Composite(base::TimeTicks());
130 EXPECT_FALSE(layer_tree_host_->output_surface_lost());
131 } 128 }
132 129
133 LayerImpl* LayerImplForScrollAreaAndScrollbar( 130 LayerImpl* LayerImplForScrollAreaAndScrollbar(
134 FakeLayerTreeHost* host, 131 FakeLayerTreeHost* host,
135 std::unique_ptr<Scrollbar> scrollbar, 132 std::unique_ptr<Scrollbar> scrollbar,
136 bool reverse_order, 133 bool reverse_order,
137 bool use_solid_color_scrollbar, 134 bool use_solid_color_scrollbar,
138 int thumb_thickness, 135 int thumb_thickness,
139 int track_start) { 136 int track_start) {
140 scoped_refptr<Layer> layer_tree_root = Layer::Create(); 137 scoped_refptr<Layer> layer_tree_root = Layer::Create();
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); 1085 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f);
1089 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); 1086 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f);
1090 1087
1091 // Horizontal Scrollbars. 1088 // Horizontal Scrollbars.
1092 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); 1089 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f);
1093 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); 1090 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f);
1094 } 1091 }
1095 1092
1096 } // namespace 1093 } // namespace
1097 } // namespace cc 1094 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/micro_benchmark_controller_unittest.cc ('k') | cc/test/fake_layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698