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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1251323002: Plumb smooth scrolling in Chromium compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 4204 matching lines...) Expand 10 before | Expand all | Expand 10 after
4215 min_page_scale_factor_(-1.f), 4215 min_page_scale_factor_(-1.f),
4216 max_page_scale_factor_(-1.f), 4216 max_page_scale_factor_(-1.f),
4217 needs_animate_(false) {} 4217 needs_animate_(false) {}
4218 4218
4219 ~TestScrollOffsetDelegate() override {} 4219 ~TestScrollOffsetDelegate() override {}
4220 4220
4221 gfx::ScrollOffset GetTotalScrollOffset() override { 4221 gfx::ScrollOffset GetTotalScrollOffset() override {
4222 return getter_return_value_; 4222 return getter_return_value_;
4223 } 4223 }
4224 4224
4225 bool IsExternalScrollActive() const override { return false; }
4226
4227 void SetNeedsAnimate(const AnimationCallback&) override { 4225 void SetNeedsAnimate(const AnimationCallback&) override {
4228 needs_animate_ = true; 4226 needs_animate_ = true;
4229 } 4227 }
4230 4228
4231 void UpdateRootLayerState(const gfx::ScrollOffset& total_scroll_offset, 4229 void UpdateRootLayerState(const gfx::ScrollOffset& total_scroll_offset,
4232 const gfx::ScrollOffset& max_scroll_offset, 4230 const gfx::ScrollOffset& max_scroll_offset,
4233 const gfx::SizeF& scrollable_size, 4231 const gfx::SizeF& scrollable_size,
4234 float page_scale_factor, 4232 float page_scale_factor,
4235 float min_page_scale_factor, 4233 float min_page_scale_factor,
4236 float max_page_scale_factor) override { 4234 float max_page_scale_factor) override {
(...skipping 3996 matching lines...) Expand 10 before | Expand all | Expand 10 after
8233 // Hold an unowned pointer to the output surface to use for mock expectations. 8231 // Hold an unowned pointer to the output surface to use for mock expectations.
8234 MockReclaimResourcesOutputSurface* mock_output_surface = output_surface.get(); 8232 MockReclaimResourcesOutputSurface* mock_output_surface = output_surface.get();
8235 8233
8236 CreateHostImpl(DefaultSettings(), output_surface.Pass()); 8234 CreateHostImpl(DefaultSettings(), output_surface.Pass());
8237 EXPECT_CALL(*mock_output_surface, ForceReclaimResources()).Times(1); 8235 EXPECT_CALL(*mock_output_surface, ForceReclaimResources()).Times(1);
8238 host_impl_->BeginCommit(); 8236 host_impl_->BeginCommit();
8239 } 8237 }
8240 8238
8241 } // namespace 8239 } // namespace
8242 } // namespace cc 8240 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698