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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 199523002: cc: Throttle swaps in Scheduler instead of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Actually, unittests need CC_EXPORT. Created 6 years, 8 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
« no previous file with comments | « cc/test/fake_output_surface_client.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time); 121 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time);
122 test_hooks_->DrawLayersOnThread(this); 122 test_hooks_->DrawLayersOnThread(this);
123 } 123 }
124 124
125 virtual bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) OVERRIDE { 125 virtual bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) OVERRIDE {
126 bool result = LayerTreeHostImpl::SwapBuffers(frame); 126 bool result = LayerTreeHostImpl::SwapBuffers(frame);
127 test_hooks_->SwapBuffersOnThread(this, result); 127 test_hooks_->SwapBuffersOnThread(this, result);
128 return result; 128 return result;
129 } 129 }
130 130
131 virtual void OnSwapBuffersComplete() OVERRIDE { 131 virtual void DidSwapBuffersComplete() OVERRIDE {
132 LayerTreeHostImpl::OnSwapBuffersComplete(); 132 LayerTreeHostImpl::DidSwapBuffersComplete();
133 test_hooks_->SwapBuffersCompleteOnThread(this); 133 test_hooks_->SwapBuffersCompleteOnThread(this);
134 } 134 }
135 135
136 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE { 136 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE {
137 LayerTreeHostImpl::ReclaimResources(ack); 137 LayerTreeHostImpl::ReclaimResources(ack);
138 } 138 }
139 139
140 virtual void UpdateVisibleTiles() OVERRIDE { 140 virtual void UpdateVisibleTiles() OVERRIDE {
141 LayerTreeHostImpl::UpdateVisibleTiles(); 141 LayerTreeHostImpl::UpdateVisibleTiles();
142 test_hooks_->UpdateVisibleTilesOnThread(this); 142 test_hooks_->UpdateVisibleTilesOnThread(this);
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 return -1; 704 return -1;
705 } 705 }
706 706
707 void LayerTreeTest::DestroyLayerTreeHost() { 707 void LayerTreeTest::DestroyLayerTreeHost() {
708 if (layer_tree_host_ && layer_tree_host_->root_layer()) 708 if (layer_tree_host_ && layer_tree_host_->root_layer())
709 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 709 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
710 layer_tree_host_.reset(); 710 layer_tree_host_.reset();
711 } 711 }
712 712
713 } // namespace cc 713 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface_client.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698