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

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

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Scheduler tests now pass and the code is cleaner. Created 6 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/single_thread_proxy.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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 virtual void SetUp() OVERRIDE { 106 virtual void SetUp() OVERRIDE {
107 CreateHostImpl(DefaultSettings(), CreateOutputSurface()); 107 CreateHostImpl(DefaultSettings(), CreateOutputSurface());
108 } 108 }
109 109
110 virtual void TearDown() OVERRIDE {} 110 virtual void TearDown() OVERRIDE {}
111 111
112 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE {} 112 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE {}
113 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {} 113 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {}
114 virtual void CommitVSyncParameters(base::TimeTicks timebase,
115 base::TimeDelta interval) OVERRIDE {}
116 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {} 114 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {}
117 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {} 115 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {}
118 virtual void DidSwapBuffersOnImplThread() OVERRIDE {} 116 virtual void DidSwapBuffersOnImplThread() OVERRIDE {}
119 virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE {} 117 virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE {}
120 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {}
121 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { 118 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE {
122 on_can_draw_state_changed_called_ = true; 119 on_can_draw_state_changed_called_ = true;
123 } 120 }
124 virtual void NotifyReadyToActivate() OVERRIDE { 121 virtual void NotifyReadyToActivate() OVERRIDE {
125 did_notify_ready_to_activate_ = true; 122 did_notify_ready_to_activate_ = true;
126 host_impl_->ActivatePendingTree(); 123 host_impl_->ActivatePendingTree();
127 } 124 }
128 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { 125 virtual void SetNeedsRedrawOnImplThread() OVERRIDE {
129 did_request_redraw_ = true; 126 did_request_redraw_ = true;
130 } 127 }
(...skipping 6485 matching lines...) Expand 10 before | Expand all | Expand 10 after
6616 FakePictureLayerImpl* active_mask_content = 6613 FakePictureLayerImpl* active_mask_content =
6617 static_cast<FakePictureLayerImpl*>( 6614 static_cast<FakePictureLayerImpl*>(
6618 host_impl_->active_tree()->root_layer()->children()[0]->mask_layer()); 6615 host_impl_->active_tree()->root_layer()->children()[0]->mask_layer());
6619 gfx::Rect r2 = active_mask_content->visible_rect_for_tile_priority(); 6616 gfx::Rect r2 = active_mask_content->visible_rect_for_tile_priority();
6620 6617
6621 ASSERT_TRUE(!r2.IsEmpty()); 6618 ASSERT_TRUE(!r2.IsEmpty());
6622 } 6619 }
6623 6620
6624 } // namespace 6621 } // namespace
6625 } // namespace cc 6622 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698