| OLD | NEW |
| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 virtual bool ReduceContentsTextureMemoryOnImplThread( | 121 virtual bool ReduceContentsTextureMemoryOnImplThread( |
| 122 size_t limit_bytes, int priority_cutoff) OVERRIDE { | 122 size_t limit_bytes, int priority_cutoff) OVERRIDE { |
| 123 return reduce_memory_result_; | 123 return reduce_memory_result_; |
| 124 } | 124 } |
| 125 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE {} | 125 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE {} |
| 126 virtual void SendManagedMemoryStats() OVERRIDE {} | 126 virtual void SendManagedMemoryStats() OVERRIDE {} |
| 127 virtual bool IsInsideDraw() OVERRIDE { return false; } | 127 virtual bool IsInsideDraw() OVERRIDE { return false; } |
| 128 virtual void RenewTreePriority() OVERRIDE {} | 128 virtual void RenewTreePriority() OVERRIDE {} |
| 129 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) | 129 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) |
| 130 OVERRIDE {} | 130 OVERRIDE {} |
| 131 virtual void DidReceiveLastInputEventForBeginFrameOnImplThread( | |
| 132 base::TimeTicks frame_time) OVERRIDE {} | |
| 133 virtual void DidActivatePendingTree() OVERRIDE {} | 131 virtual void DidActivatePendingTree() OVERRIDE {} |
| 134 | 132 |
| 135 void set_reduce_memory_result(bool reduce_memory_result) { | 133 void set_reduce_memory_result(bool reduce_memory_result) { |
| 136 reduce_memory_result_ = reduce_memory_result; | 134 reduce_memory_result_ = reduce_memory_result; |
| 137 } | 135 } |
| 138 | 136 |
| 139 void CreateLayerTreeHost(bool partial_swap, | 137 void CreateLayerTreeHost(bool partial_swap, |
| 140 scoped_ptr<OutputSurface> output_surface) { | 138 scoped_ptr<OutputSurface> output_surface) { |
| 141 LayerTreeSettings settings; | 139 LayerTreeSettings settings; |
| 142 settings.minimum_occlusion_tracking_size = gfx::Size(); | 140 settings.minimum_occlusion_tracking_size = gfx::Size(); |
| (...skipping 5692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5835 EXPECT_TRUE(host_impl_->PrepareToDraw(&frame, gfx::Rect())); | 5833 EXPECT_TRUE(host_impl_->PrepareToDraw(&frame, gfx::Rect())); |
| 5836 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); | 5834 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); |
| 5837 host_impl_->DidDrawAllLayers(frame); | 5835 host_impl_->DidDrawAllLayers(frame); |
| 5838 | 5836 |
| 5839 EXPECT_EQ(1u, frame.will_draw_layers.size()); | 5837 EXPECT_EQ(1u, frame.will_draw_layers.size()); |
| 5840 EXPECT_EQ(host_impl_->active_tree()->root_layer(), frame.will_draw_layers[0]); | 5838 EXPECT_EQ(host_impl_->active_tree()->root_layer(), frame.will_draw_layers[0]); |
| 5841 } | 5839 } |
| 5842 | 5840 |
| 5843 } // namespace | 5841 } // namespace |
| 5844 } // namespace cc | 5842 } // namespace cc |
| OLD | NEW |