| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void NotifyReadyToDraw() override {} | 135 void NotifyReadyToDraw() override {} |
| 136 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } | 136 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } |
| 137 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override { | 137 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override { |
| 138 did_request_redraw_ = true; | 138 did_request_redraw_ = true; |
| 139 } | 139 } |
| 140 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } | 140 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } |
| 141 void SetNeedsPrepareTilesOnImplThread() override { | 141 void SetNeedsPrepareTilesOnImplThread() override { |
| 142 did_request_prepare_tiles_ = true; | 142 did_request_prepare_tiles_ = true; |
| 143 } | 143 } |
| 144 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } | 144 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } |
| 145 void SetVideoNeedsBeginFrames(bool needs_begin_frames) override {} |
| 145 void PostAnimationEventsToMainThreadOnImplThread( | 146 void PostAnimationEventsToMainThreadOnImplThread( |
| 146 scoped_ptr<AnimationEventsVector> events) override {} | 147 scoped_ptr<AnimationEventsVector> events) override {} |
| 147 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, | 148 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, |
| 148 int priority_cutoff) override { | 149 int priority_cutoff) override { |
| 149 current_limit_bytes_ = limit_bytes; | 150 current_limit_bytes_ = limit_bytes; |
| 150 current_priority_cutoff_value_ = priority_cutoff; | 151 current_priority_cutoff_value_ = priority_cutoff; |
| 151 return reduce_memory_result_; | 152 return reduce_memory_result_; |
| 152 } | 153 } |
| 153 bool IsInsideDraw() override { return false; } | 154 bool IsInsideDraw() override { return false; } |
| 154 void RenewTreePriority() override {} | 155 void RenewTreePriority() override {} |
| (...skipping 8282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8437 // surface. | 8438 // surface. |
| 8438 EXPECT_EQ(0, num_lost_surfaces_); | 8439 EXPECT_EQ(0, num_lost_surfaces_); |
| 8439 host_impl_->DidLoseOutputSurface(); | 8440 host_impl_->DidLoseOutputSurface(); |
| 8440 EXPECT_EQ(1, num_lost_surfaces_); | 8441 EXPECT_EQ(1, num_lost_surfaces_); |
| 8441 host_impl_->DidLoseOutputSurface(); | 8442 host_impl_->DidLoseOutputSurface(); |
| 8442 EXPECT_LE(1, num_lost_surfaces_); | 8443 EXPECT_LE(1, num_lost_surfaces_); |
| 8443 } | 8444 } |
| 8444 | 8445 |
| 8445 } // namespace | 8446 } // namespace |
| 8446 } // namespace cc | 8447 } // namespace cc |
| OLD | NEW |