| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 &proxy_, | 85 &proxy_, |
| 86 &stats_instrumentation_); | 86 &stats_instrumentation_); |
| 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, | |
| 96 base::TimeDelta interval) OVERRIDE {} | |
| 97 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) | 95 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) |
| 98 OVERRIDE {} | 96 OVERRIDE {} |
| 99 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { | 97 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { |
| 100 on_can_draw_state_changed_called_ = true; | 98 on_can_draw_state_changed_called_ = true; |
| 101 } | 99 } |
| 102 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE { | 100 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE { |
| 103 has_pending_tree_ = has_pending_tree; | 101 has_pending_tree_ = has_pending_tree; |
| 104 } | 102 } |
| 105 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { | 103 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { |
| 106 did_request_redraw_ = true; | 104 did_request_redraw_ = true; |
| (...skipping 5726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5833 EXPECT_TRUE(host_impl_->PrepareToDraw(&frame, gfx::Rect())); | 5831 EXPECT_TRUE(host_impl_->PrepareToDraw(&frame, gfx::Rect())); |
| 5834 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); | 5832 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); |
| 5835 host_impl_->DidDrawAllLayers(frame); | 5833 host_impl_->DidDrawAllLayers(frame); |
| 5836 | 5834 |
| 5837 EXPECT_EQ(1u, frame.will_draw_layers.size()); | 5835 EXPECT_EQ(1u, frame.will_draw_layers.size()); |
| 5838 EXPECT_EQ(host_impl_->active_tree()->root_layer(), frame.will_draw_layers[0]); | 5836 EXPECT_EQ(host_impl_->active_tree()->root_layer(), frame.will_draw_layers[0]); |
| 5839 } | 5837 } |
| 5840 | 5838 |
| 5841 } // namespace | 5839 } // namespace |
| 5842 } // namespace cc | 5840 } // namespace cc |
| OLD | NEW |