| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 host_impl_->InitializeRenderer(CreateOutputSurface()); | 89 host_impl_->InitializeRenderer(CreateOutputSurface()); |
| 90 host_impl_->SetViewportSize(gfx::Size(10, 10)); | 90 host_impl_->SetViewportSize(gfx::Size(10, 10)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 virtual void TearDown() OVERRIDE {} | 93 virtual void TearDown() OVERRIDE {} |
| 94 | 94 |
| 95 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {} | 95 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {} |
| 96 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {} | 96 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {} |
| 97 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 97 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 98 base::TimeDelta interval) OVERRIDE {} | 98 base::TimeDelta interval) OVERRIDE {} |
| 99 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE {} | 99 virtual void DidBeginImplFrame(base::TimeTicks frame_time) OVERRIDE {} |
| 100 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { | 100 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { |
| 101 on_can_draw_state_changed_called_ = true; | 101 on_can_draw_state_changed_called_ = true; |
| 102 } | 102 } |
| 103 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE { | 103 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE { |
| 104 has_pending_tree_ = has_pending_tree; | 104 has_pending_tree_ = has_pending_tree; |
| 105 } | 105 } |
| 106 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { | 106 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { |
| 107 did_request_redraw_ = true; | 107 did_request_redraw_ = true; |
| 108 } | 108 } |
| 109 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) OVERRIDE { | 109 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) OVERRIDE { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 122 virtual bool ReduceContentsTextureMemoryOnImplThread( | 122 virtual bool ReduceContentsTextureMemoryOnImplThread( |
| 123 size_t limit_bytes, int priority_cutoff) OVERRIDE { | 123 size_t limit_bytes, int priority_cutoff) OVERRIDE { |
| 124 return reduce_memory_result_; | 124 return reduce_memory_result_; |
| 125 } | 125 } |
| 126 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE {} | 126 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE {} |
| 127 virtual void SendManagedMemoryStats() OVERRIDE {} | 127 virtual void SendManagedMemoryStats() OVERRIDE {} |
| 128 virtual bool IsInsideDraw() OVERRIDE { return false; } | 128 virtual bool IsInsideDraw() OVERRIDE { return false; } |
| 129 virtual void RenewTreePriority() OVERRIDE {} | 129 virtual void RenewTreePriority() OVERRIDE {} |
| 130 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) | 130 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) |
| 131 OVERRIDE {} | 131 OVERRIDE {} |
| 132 virtual void DidReceiveLastInputEventForVSync(base::TimeTicks frame_time) | 132 virtual void DidReceiveLastInputEventForBeginImplFrame( |
| 133 OVERRIDE {} | 133 base::TimeTicks frame_time) OVERRIDE {} |
| 134 virtual void DidActivatePendingTree() OVERRIDE {} | 134 virtual void DidActivatePendingTree() OVERRIDE {} |
| 135 | 135 |
| 136 void set_reduce_memory_result(bool reduce_memory_result) { | 136 void set_reduce_memory_result(bool reduce_memory_result) { |
| 137 reduce_memory_result_ = reduce_memory_result; | 137 reduce_memory_result_ = reduce_memory_result; |
| 138 } | 138 } |
| 139 | 139 |
| 140 void CreateLayerTreeHost(bool partial_swap, | 140 void CreateLayerTreeHost(bool partial_swap, |
| 141 scoped_ptr<OutputSurface> output_surface) { | 141 scoped_ptr<OutputSurface> output_surface) { |
| 142 LayerTreeSettings settings; | 142 LayerTreeSettings settings; |
| 143 settings.minimum_occlusion_tracking_size = gfx::Size(); | 143 settings.minimum_occlusion_tracking_size = gfx::Size(); |
| (...skipping 5369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5513 host_impl_->DrawLayers(&frame, base::TimeTicks()); | 5513 host_impl_->DrawLayers(&frame, base::TimeTicks()); |
| 5514 host_impl_->DidDrawAllLayers(frame); | 5514 host_impl_->DidDrawAllLayers(frame); |
| 5515 } | 5515 } |
| 5516 CompositorFrameAck ack; | 5516 CompositorFrameAck ack; |
| 5517 host_impl_->OnSendFrameToParentCompositorAck(ack); | 5517 host_impl_->OnSendFrameToParentCompositorAck(ack); |
| 5518 EXPECT_EQ(swap_buffers_complete_, 1); | 5518 EXPECT_EQ(swap_buffers_complete_, 1); |
| 5519 } | 5519 } |
| 5520 | 5520 |
| 5521 } // namespace | 5521 } // namespace |
| 5522 } // namespace cc | 5522 } // namespace cc |
| OLD | NEW |