| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 void NotifyReadyToDraw() override {} | 137 void NotifyReadyToDraw() override {} |
| 138 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } | 138 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } |
| 139 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override { | 139 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override { |
| 140 did_request_redraw_ = true; | 140 did_request_redraw_ = true; |
| 141 } | 141 } |
| 142 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } | 142 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } |
| 143 void SetNeedsPrepareTilesOnImplThread() override { | 143 void SetNeedsPrepareTilesOnImplThread() override { |
| 144 did_request_prepare_tiles_ = true; | 144 did_request_prepare_tiles_ = true; |
| 145 } | 145 } |
| 146 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } | 146 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } |
| 147 void SetVideoNeedsBeginFrames(bool needs_begin_frames) override {} |
| 147 void PostAnimationEventsToMainThreadOnImplThread( | 148 void PostAnimationEventsToMainThreadOnImplThread( |
| 148 scoped_ptr<AnimationEventsVector> events) override {} | 149 scoped_ptr<AnimationEventsVector> events) override {} |
| 149 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, | 150 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, |
| 150 int priority_cutoff) override { | 151 int priority_cutoff) override { |
| 151 current_limit_bytes_ = limit_bytes; | 152 current_limit_bytes_ = limit_bytes; |
| 152 current_priority_cutoff_value_ = priority_cutoff; | 153 current_priority_cutoff_value_ = priority_cutoff; |
| 153 return reduce_memory_result_; | 154 return reduce_memory_result_; |
| 154 } | 155 } |
| 155 bool IsInsideDraw() override { return false; } | 156 bool IsInsideDraw() override { return false; } |
| 156 void RenewTreePriority() override {} | 157 void RenewTreePriority() override {} |
| (...skipping 7727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7884 EXPECT_FALSE(frame.render_passes_by_id[RenderPassId(2, 0)]); | 7885 EXPECT_FALSE(frame.render_passes_by_id[RenderPassId(2, 0)]); |
| 7885 EXPECT_FALSE(frame.render_passes_by_id[RenderPassId(3, 0)]); | 7886 EXPECT_FALSE(frame.render_passes_by_id[RenderPassId(3, 0)]); |
| 7886 EXPECT_EQ(1u, frame.render_passes.size()); | 7887 EXPECT_EQ(1u, frame.render_passes.size()); |
| 7887 EXPECT_EQ(RenderPassId(1, 0), frame.render_passes[0]->id); | 7888 EXPECT_EQ(RenderPassId(1, 0), frame.render_passes[0]->id); |
| 7888 // The RenderPassDrawQuad should be removed from pass1. | 7889 // The RenderPassDrawQuad should be removed from pass1. |
| 7889 EXPECT_EQ(0u, pass1->quad_list.size()); | 7890 EXPECT_EQ(0u, pass1->quad_list.size()); |
| 7890 } | 7891 } |
| 7891 | 7892 |
| 7892 } // namespace | 7893 } // namespace |
| 7893 } // namespace cc | 7894 } // namespace cc |
| OLD | NEW |