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

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

Issue 133263004: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate -- V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mojo build Created 6 years, 11 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 | Annotate | Revision Log
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 layer_tree_host_->SetPageScaleFactorAndLimits( 107 layer_tree_host_->SetPageScaleFactorAndLimits(
108 page_scale_factor, minimum, maximum); 108 page_scale_factor, minimum, maximum);
109 } 109 }
110 110
111 void WebLayerTreeViewImplForTesting::startPageScaleAnimation( 111 void WebLayerTreeViewImplForTesting::startPageScaleAnimation(
112 const blink::WebPoint& scroll, 112 const blink::WebPoint& scroll,
113 bool use_anchor, 113 bool use_anchor,
114 float new_page_scale, 114 float new_page_scale,
115 double duration_sec) {} 115 double duration_sec) {}
116 116
117 // Renamed. Staged for removal.
117 void WebLayerTreeViewImplForTesting::setNeedsAnimate() { 118 void WebLayerTreeViewImplForTesting::setNeedsAnimate() {
118 layer_tree_host_->SetNeedsAnimate(); 119 setNeedsUpdateLayers();
119 } 120 }
120 121
122 void WebLayerTreeViewImplForTesting::setNeedsUpdateLayers() {
123 layer_tree_host_->SetNeedsUpdateLayers();
124 }
125
126 // Unused. Staged for removal.
121 bool WebLayerTreeViewImplForTesting::commitRequested() const { 127 bool WebLayerTreeViewImplForTesting::commitRequested() const {
122 return layer_tree_host_->CommitRequested(); 128 NOTREACHED();
129 return false;
123 } 130 }
124 131
125 void WebLayerTreeViewImplForTesting::composite() { 132 void WebLayerTreeViewImplForTesting::composite() {
126 layer_tree_host_->Composite(gfx::FrameTime::Now()); 133 layer_tree_host_->Composite(gfx::FrameTime::Now());
127 } 134 }
128 135
129 void WebLayerTreeViewImplForTesting::didStopFlinging() {} 136 void WebLayerTreeViewImplForTesting::didStopFlinging() {}
130 137
131 bool WebLayerTreeViewImplForTesting::compositeAndReadback( 138 bool WebLayerTreeViewImplForTesting::compositeAndReadback(
132 void* pixels, const WebRect& rect_in_device_viewport) { 139 void* pixels, const WebRect& rect_in_device_viewport) {
(...skipping 25 matching lines...) Expand all
158 } 165 }
159 166
160 scoped_refptr<cc::ContextProvider> 167 scoped_refptr<cc::ContextProvider>
161 WebLayerTreeViewImplForTesting::OffscreenContextProvider() { 168 WebLayerTreeViewImplForTesting::OffscreenContextProvider() {
162 // Unit tests only run in single threaded mode. 169 // Unit tests only run in single threaded mode.
163 return webkit::gpu::TestContextProviderFactory::GetInstance()-> 170 return webkit::gpu::TestContextProviderFactory::GetInstance()->
164 OffscreenContextProviderForMainThread(); 171 OffscreenContextProviderForMainThread();
165 } 172 }
166 173
167 } // namespace webkit 174 } // namespace webkit
OLDNEW
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.h ('k') | mojo/examples/compositor_app/compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698