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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Created 3 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 class LayerTreeHostScrollTestScrollSnapping : public LayerTreeHostScrollTest { 500 class LayerTreeHostScrollTestScrollSnapping : public LayerTreeHostScrollTest {
501 public: 501 public:
502 LayerTreeHostScrollTestScrollSnapping() : scroll_amount_(1.75, 0) {} 502 LayerTreeHostScrollTestScrollSnapping() : scroll_amount_(1.75, 0) {}
503 503
504 void SetupTree() override { 504 void SetupTree() override {
505 LayerTreeHostScrollTest::SetupTree(); 505 LayerTreeHostScrollTest::SetupTree();
506 layer_tree_host() 506 layer_tree_host()
507 ->outer_viewport_scroll_layer() 507 ->outer_viewport_scroll_layer()
508 ->scroll_clip_layer() 508 ->scroll_clip_layer()
509 ->SetForceRenderSurfaceForTesting(true); 509 ->SetForceRenderSurface(true);
510 gfx::Transform translate; 510 gfx::Transform translate;
511 translate.Translate(0.25f, 0.f); 511 translate.Translate(0.25f, 0.f);
512 layer_tree_host() 512 layer_tree_host()
513 ->outer_viewport_scroll_layer() 513 ->outer_viewport_scroll_layer()
514 ->scroll_clip_layer() 514 ->scroll_clip_layer()
515 ->SetTransform(translate); 515 ->SetTransform(translate);
516 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.1f, 100.f); 516 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.1f, 100.f);
517 } 517 }
518 518
519 void BeginTest() override { PostSetNeedsCommitToMainThread(); } 519 void BeginTest() override { PostSetNeedsCommitToMainThread(); }
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 CompletionEvent* impl_side_invalidation_event_ = nullptr; 2260 CompletionEvent* impl_side_invalidation_event_ = nullptr;
2261 2261
2262 // Main thread. 2262 // Main thread.
2263 int num_of_deltas_ = 0; 2263 int num_of_deltas_ = 0;
2264 }; 2264 };
2265 2265
2266 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestImplSideInvalidation); 2266 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestImplSideInvalidation);
2267 2267
2268 } // namespace 2268 } // namespace
2269 } // namespace cc 2269 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698