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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 126 } |
127 void NotifyReadyToActivate() override { | 127 void NotifyReadyToActivate() override { |
128 did_notify_ready_to_activate_ = true; | 128 did_notify_ready_to_activate_ = true; |
129 host_impl_->ActivateSyncTree(); | 129 host_impl_->ActivateSyncTree(); |
130 } | 130 } |
131 void NotifyReadyToDraw() override {} | 131 void NotifyReadyToDraw() override {} |
132 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } | 132 void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } |
133 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override { | 133 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override { |
134 did_request_redraw_ = true; | 134 did_request_redraw_ = true; |
135 } | 135 } |
| 136 void OutputSurfaceDidRequestDraw() override {} |
136 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } | 137 void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } |
137 void SetNeedsPrepareTilesOnImplThread() override { | 138 void SetNeedsPrepareTilesOnImplThread() override { |
138 did_request_prepare_tiles_ = true; | 139 did_request_prepare_tiles_ = true; |
139 } | 140 } |
140 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } | 141 void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } |
141 void PostAnimationEventsToMainThreadOnImplThread( | 142 void PostAnimationEventsToMainThreadOnImplThread( |
142 scoped_ptr<AnimationEventsVector> events) override {} | 143 scoped_ptr<AnimationEventsVector> events) override {} |
143 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, | 144 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, |
144 int priority_cutoff) override { | 145 int priority_cutoff) override { |
145 current_limit_bytes_ = limit_bytes; | 146 current_limit_bytes_ = limit_bytes; |
(...skipping 7809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7955 // surface. | 7956 // surface. |
7956 EXPECT_EQ(0, num_lost_surfaces_); | 7957 EXPECT_EQ(0, num_lost_surfaces_); |
7957 host_impl_->DidLoseOutputSurface(); | 7958 host_impl_->DidLoseOutputSurface(); |
7958 EXPECT_EQ(1, num_lost_surfaces_); | 7959 EXPECT_EQ(1, num_lost_surfaces_); |
7959 host_impl_->DidLoseOutputSurface(); | 7960 host_impl_->DidLoseOutputSurface(); |
7960 EXPECT_LE(1, num_lost_surfaces_); | 7961 EXPECT_LE(1, num_lost_surfaces_); |
7961 } | 7962 } |
7962 | 7963 |
7963 } // namespace | 7964 } // namespace |
7964 } // namespace cc | 7965 } // namespace cc |
OLD | NEW |