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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 active_tree_->ResetContentsTexturesPurged(); | 289 active_tree_->ResetContentsTexturesPurged(); |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
293 void LayerTreeHostImpl::BeginCommit() { | 293 void LayerTreeHostImpl::BeginCommit() { |
294 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit"); | 294 TRACE_EVENT0("cc", "LayerTreeHostImpl::BeginCommit"); |
295 | 295 |
296 // Ensure all textures are returned so partial texture updates can happen | 296 // Ensure all textures are returned so partial texture updates can happen |
297 // during the commit. Impl-side-painting doesn't upload during commits, so | 297 // during the commit. Impl-side-painting doesn't upload during commits, so |
298 // is unaffected. | 298 // is unaffected. |
299 if (!settings_.impl_side_painting) | 299 if (!settings_.impl_side_painting && output_surface_) |
300 output_surface_->ForceReclaimResources(); | 300 output_surface_->ForceReclaimResources(); |
301 | 301 |
302 if (UsePendingTreeForSync()) | 302 if (UsePendingTreeForSync()) |
303 CreatePendingTree(); | 303 CreatePendingTree(); |
304 } | 304 } |
305 | 305 |
306 void LayerTreeHostImpl::CommitComplete() { | 306 void LayerTreeHostImpl::CommitComplete() { |
307 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); | 307 TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete"); |
308 | 308 |
309 if (pending_tree_) | 309 if (pending_tree_) |
(...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3507 } | 3507 } |
3508 | 3508 |
3509 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3509 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3510 std::vector<PictureLayerImpl*>::iterator it = | 3510 std::vector<PictureLayerImpl*>::iterator it = |
3511 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3511 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3512 DCHECK(it != picture_layers_.end()); | 3512 DCHECK(it != picture_layers_.end()); |
3513 picture_layers_.erase(it); | 3513 picture_layers_.erase(it); |
3514 } | 3514 } |
3515 | 3515 |
3516 } // namespace cc | 3516 } // namespace cc |
OLD | NEW |