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

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

Issue 15058004: cc: Rename VSync to BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 host_impl_->InitializeRenderer(CreateOutputSurface()); 87 host_impl_->InitializeRenderer(CreateOutputSurface());
88 host_impl_->SetViewportSize(gfx::Size(10, 10)); 88 host_impl_->SetViewportSize(gfx::Size(10, 10));
89 } 89 }
90 90
91 virtual void TearDown() OVERRIDE {} 91 virtual void TearDown() OVERRIDE {}
92 92
93 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {} 93 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {}
94 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {} 94 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {}
95 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, 95 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
96 base::TimeDelta interval) OVERRIDE {} 96 base::TimeDelta interval) OVERRIDE {}
97 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE {} 97 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time)
98 OVERRIDE {}
98 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { 99 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE {
99 on_can_draw_state_changed_called_ = true; 100 on_can_draw_state_changed_called_ = true;
100 } 101 }
101 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE { 102 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE {
102 has_pending_tree_ = has_pending_tree; 103 has_pending_tree_ = has_pending_tree;
103 } 104 }
104 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { 105 virtual void SetNeedsRedrawOnImplThread() OVERRIDE {
105 did_request_redraw_ = true; 106 did_request_redraw_ = true;
106 } 107 }
107 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) OVERRIDE { 108 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) OVERRIDE {
(...skipping 12 matching lines...) Expand all
120 virtual bool ReduceContentsTextureMemoryOnImplThread( 121 virtual bool ReduceContentsTextureMemoryOnImplThread(
121 size_t limit_bytes, int priority_cutoff) OVERRIDE { 122 size_t limit_bytes, int priority_cutoff) OVERRIDE {
122 return reduce_memory_result_; 123 return reduce_memory_result_;
123 } 124 }
124 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE {} 125 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE {}
125 virtual void SendManagedMemoryStats() OVERRIDE {} 126 virtual void SendManagedMemoryStats() OVERRIDE {}
126 virtual bool IsInsideDraw() OVERRIDE { return false; } 127 virtual bool IsInsideDraw() OVERRIDE { return false; }
127 virtual void RenewTreePriority() OVERRIDE {} 128 virtual void RenewTreePriority() OVERRIDE {}
128 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) 129 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay)
129 OVERRIDE {} 130 OVERRIDE {}
130 virtual void DidReceiveLastInputEventForVSync(base::TimeTicks frame_time) 131 virtual void DidReceiveLastInputEventForBeginFrameOnImplThread(
131 OVERRIDE {} 132 base::TimeTicks frame_time) OVERRIDE {}
132 virtual void DidActivatePendingTree() OVERRIDE {} 133 virtual void DidActivatePendingTree() OVERRIDE {}
133 134
134 void set_reduce_memory_result(bool reduce_memory_result) { 135 void set_reduce_memory_result(bool reduce_memory_result) {
135 reduce_memory_result_ = reduce_memory_result; 136 reduce_memory_result_ = reduce_memory_result;
136 } 137 }
137 138
138 void CreateLayerTreeHost(bool partial_swap, 139 void CreateLayerTreeHost(bool partial_swap,
139 scoped_ptr<OutputSurface> output_surface) { 140 scoped_ptr<OutputSurface> output_surface) {
140 LayerTreeSettings settings; 141 LayerTreeSettings settings;
141 settings.minimum_occlusion_tracking_size = gfx::Size(); 142 settings.minimum_occlusion_tracking_size = gfx::Size();
(...skipping 5551 matching lines...) Expand 10 before | Expand all | Expand 10 after
5693 EXPECT_EQ(0, software_device->frames_ended_); 5694 EXPECT_EQ(0, software_device->frames_ended_);
5694 5695
5695 DrawFrame(); 5696 DrawFrame();
5696 5697
5697 EXPECT_EQ(1, software_device->frames_began_); 5698 EXPECT_EQ(1, software_device->frames_began_);
5698 EXPECT_EQ(1, software_device->frames_ended_); 5699 EXPECT_EQ(1, software_device->frames_ended_);
5699 } 5700 }
5700 5701
5701 } // namespace 5702 } // namespace
5702 } // namespace cc 5703 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698