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

Side by Side Diff: content/test/web_layer_tree_view_impl_for_testing.cc

Issue 738983002: Move output surface fallback from cc to embedders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/test/web_layer_tree_view_impl_for_testing.h" 5 #include "content/test/web_layer_tree_view_impl_for_testing.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 const gfx::Vector2d& inner_delta, 148 const gfx::Vector2d& inner_delta,
149 const gfx::Vector2d& outer_delta, 149 const gfx::Vector2d& outer_delta,
150 float page_scale, 150 float page_scale,
151 float top_controls_delta) {} 151 float top_controls_delta) {}
152 152
153 void WebLayerTreeViewImplForTesting::ApplyViewportDeltas( 153 void WebLayerTreeViewImplForTesting::ApplyViewportDeltas(
154 const gfx::Vector2d& scroll_delta, 154 const gfx::Vector2d& scroll_delta,
155 float page_scale, 155 float page_scale,
156 float top_controls_delta) {} 156 float top_controls_delta) {}
157 157
158 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface( 158 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface() {
159 bool fallback) {
160 bool flipped_output_surface = false; 159 bool flipped_output_surface = false;
161 layer_tree_host_->SetOutputSurface( 160 layer_tree_host_->SetOutputSurface(
162 make_scoped_ptr(new cc::PixelTestOutputSurface( 161 make_scoped_ptr(new cc::PixelTestOutputSurface(
163 cc::TestContextProvider::Create(), flipped_output_surface))); 162 cc::TestContextProvider::Create(), flipped_output_surface)));
164 } 163 }
165 164
165 void WebLayerTreeViewImplForTesting::DidFailToInitializeOutputSurface() {
166 RequestNewOutputSurface();
167 }
168
166 void WebLayerTreeViewImplForTesting::registerViewportLayers( 169 void WebLayerTreeViewImplForTesting::registerViewportLayers(
167 const blink::WebLayer* overscrollElasticityLayer, 170 const blink::WebLayer* overscrollElasticityLayer,
168 const blink::WebLayer* pageScaleLayer, 171 const blink::WebLayer* pageScaleLayer,
169 const blink::WebLayer* innerViewportScrollLayer, 172 const blink::WebLayer* innerViewportScrollLayer,
170 const blink::WebLayer* outerViewportScrollLayer) { 173 const blink::WebLayer* outerViewportScrollLayer) {
171 layer_tree_host_->RegisterViewportLayers( 174 layer_tree_host_->RegisterViewportLayers(
172 // The scroll elasticity layer will only exist when using pinch virtual 175 // The scroll elasticity layer will only exist when using pinch virtual
173 // viewports. 176 // viewports.
174 overscrollElasticityLayer 177 overscrollElasticityLayer
175 ? static_cast<const cc_blink::WebLayerImpl*>( 178 ? static_cast<const cc_blink::WebLayerImpl*>(
(...skipping 19 matching lines...) Expand all
195 198
196 void WebLayerTreeViewImplForTesting::registerSelection( 199 void WebLayerTreeViewImplForTesting::registerSelection(
197 const blink::WebSelectionBound& start, 200 const blink::WebSelectionBound& start,
198 const blink::WebSelectionBound& end) { 201 const blink::WebSelectionBound& end) {
199 } 202 }
200 203
201 void WebLayerTreeViewImplForTesting::clearSelection() { 204 void WebLayerTreeViewImplForTesting::clearSelection() {
202 } 205 }
203 206
204 } // namespace content 207 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698