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

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

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

Powered by Google App Engine
This is Rietveld 408576698