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 <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 resourceless_software_draw_ = resourceless_software_draw; | 1383 resourceless_software_draw_ = resourceless_software_draw; |
1384 } | 1384 } |
1385 | 1385 |
1386 void LayerTreeHostImpl::SetNeedsRedrawRect(const gfx::Rect& damage_rect) { | 1386 void LayerTreeHostImpl::SetNeedsRedrawRect(const gfx::Rect& damage_rect) { |
1387 if (damage_rect.IsEmpty()) | 1387 if (damage_rect.IsEmpty()) |
1388 return; | 1388 return; |
1389 NotifySwapPromiseMonitorsOfSetNeedsRedraw(); | 1389 NotifySwapPromiseMonitorsOfSetNeedsRedraw(); |
1390 client_->SetNeedsRedrawRectOnImplThread(damage_rect); | 1390 client_->SetNeedsRedrawRectOnImplThread(damage_rect); |
1391 } | 1391 } |
1392 | 1392 |
| 1393 void LayerTreeHostImpl::RequestDraw() { |
| 1394 client_->OutputSurfaceDidRequestDraw(); |
| 1395 } |
| 1396 |
1393 void LayerTreeHostImpl::DidSwapBuffers() { | 1397 void LayerTreeHostImpl::DidSwapBuffers() { |
1394 client_->DidSwapBuffersOnImplThread(); | 1398 client_->DidSwapBuffersOnImplThread(); |
1395 } | 1399 } |
1396 | 1400 |
1397 void LayerTreeHostImpl::DidSwapBuffersComplete() { | 1401 void LayerTreeHostImpl::DidSwapBuffersComplete() { |
1398 client_->DidSwapBuffersCompleteOnImplThread(); | 1402 client_->DidSwapBuffersCompleteOnImplThread(); |
1399 } | 1403 } |
1400 | 1404 |
1401 void LayerTreeHostImpl::ReclaimResources(const CompositorFrameAck* ack) { | 1405 void LayerTreeHostImpl::ReclaimResources(const CompositorFrameAck* ack) { |
1402 // TODO(piman): We may need to do some validation on this ack before | 1406 // TODO(piman): We may need to do some validation on this ack before |
(...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3480 } | 3484 } |
3481 | 3485 |
3482 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3486 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3483 std::vector<PictureLayerImpl*>::iterator it = | 3487 std::vector<PictureLayerImpl*>::iterator it = |
3484 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3488 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3485 DCHECK(it != picture_layers_.end()); | 3489 DCHECK(it != picture_layers_.end()); |
3486 picture_layers_.erase(it); | 3490 picture_layers_.erase(it); |
3487 } | 3491 } |
3488 | 3492 |
3489 } // namespace cc | 3493 } // namespace cc |
OLD | NEW |