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

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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 const gfx::Vector2dF& elastic_overscroll_delta, 150 const gfx::Vector2dF& elastic_overscroll_delta,
151 float page_scale, 151 float page_scale,
152 float top_controls_delta) { 152 float top_controls_delta) {
153 } 153 }
154 154
155 void WebLayerTreeViewImplForTesting::ApplyViewportDeltas( 155 void WebLayerTreeViewImplForTesting::ApplyViewportDeltas(
156 const gfx::Vector2d& scroll_delta, 156 const gfx::Vector2d& scroll_delta,
157 float page_scale, 157 float page_scale,
158 float top_controls_delta) {} 158 float top_controls_delta) {}
159 159
160 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface( 160 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface() {
161 bool fallback) {
162 bool flipped_output_surface = false; 161 bool flipped_output_surface = false;
163 layer_tree_host_->SetOutputSurface( 162 layer_tree_host_->SetOutputSurface(
164 make_scoped_ptr(new cc::PixelTestOutputSurface( 163 make_scoped_ptr(new cc::PixelTestOutputSurface(
165 cc::TestContextProvider::Create(), flipped_output_surface))); 164 cc::TestContextProvider::Create(), flipped_output_surface)));
166 } 165 }
167 166
167 void WebLayerTreeViewImplForTesting::DidFailToInitializeOutputSurface() {
168 RequestNewOutputSurface();
169 }
170
168 void WebLayerTreeViewImplForTesting::registerViewportLayers( 171 void WebLayerTreeViewImplForTesting::registerViewportLayers(
169 const blink::WebLayer* overscrollElasticityLayer, 172 const blink::WebLayer* overscrollElasticityLayer,
170 const blink::WebLayer* pageScaleLayer, 173 const blink::WebLayer* pageScaleLayer,
171 const blink::WebLayer* innerViewportScrollLayer, 174 const blink::WebLayer* innerViewportScrollLayer,
172 const blink::WebLayer* outerViewportScrollLayer) { 175 const blink::WebLayer* outerViewportScrollLayer) {
173 layer_tree_host_->RegisterViewportLayers( 176 layer_tree_host_->RegisterViewportLayers(
174 // The scroll elasticity layer will only exist when using pinch virtual 177 // The scroll elasticity layer will only exist when using pinch virtual
175 // viewports. 178 // viewports.
176 overscrollElasticityLayer 179 overscrollElasticityLayer
177 ? static_cast<const cc_blink::WebLayerImpl*>( 180 ? static_cast<const cc_blink::WebLayerImpl*>(
(...skipping 19 matching lines...) Expand all
197 200
198 void WebLayerTreeViewImplForTesting::registerSelection( 201 void WebLayerTreeViewImplForTesting::registerSelection(
199 const blink::WebSelectionBound& start, 202 const blink::WebSelectionBound& start,
200 const blink::WebSelectionBound& end) { 203 const blink::WebSelectionBound& end) {
201 } 204 }
202 205
203 void WebLayerTreeViewImplForTesting::clearSelection() { 206 void WebLayerTreeViewImplForTesting::clearSelection() {
204 } 207 }
205 208
206 } // namespace content 209 } // namespace content
OLDNEW
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.h ('k') | mojo/services/html_viewer/weblayertreeview_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698