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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3674 return; | 3674 return; |
3675 | 3675 |
3676 debug_state_ = new_debug_state; | 3676 debug_state_ = new_debug_state; |
3677 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); | 3677 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); |
3678 SetFullRootLayerDamage(); | 3678 SetFullRootLayerDamage(); |
3679 } | 3679 } |
3680 | 3680 |
3681 void LayerTreeHostImpl::CreateUIResource(UIResourceId uid, | 3681 void LayerTreeHostImpl::CreateUIResource(UIResourceId uid, |
3682 const UIResourceBitmap& bitmap) { | 3682 const UIResourceBitmap& bitmap) { |
3683 DCHECK_GT(uid, 0); | 3683 DCHECK_GT(uid, 0); |
3684 DCHECK(&bitmap); | |
vmpstr
2016/07/15 21:29:23
This shouldn't be here. We should be DCHECKing at
Donn Denman
2016/07/15 22:05:56
Removed.
| |
3684 | 3685 |
3685 // Allow for multiple creation requests with the same UIResourceId. The | 3686 // Allow for multiple creation requests with the same UIResourceId. The |
3686 // previous resource is simply deleted. | 3687 // previous resource is simply deleted. |
3687 ResourceId id = ResourceIdForUIResource(uid); | 3688 ResourceId id = ResourceIdForUIResource(uid); |
3688 if (id) | 3689 if (id) |
3689 DeleteUIResource(uid); | 3690 DeleteUIResource(uid); |
3690 | 3691 |
3691 ResourceFormat format = resource_provider_->best_texture_format(); | 3692 ResourceFormat format = resource_provider_->best_texture_format(); |
3692 switch (bitmap.GetFormat()) { | 3693 switch (bitmap.GetFormat()) { |
3693 case UIResourceBitmap::RGBA8: | 3694 case UIResourceBitmap::RGBA8: |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4023 return task_runner_provider_->HasImplThread(); | 4024 return task_runner_provider_->HasImplThread(); |
4024 } | 4025 } |
4025 | 4026 |
4026 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4027 bool LayerTreeHostImpl::CommitToActiveTree() const { |
4027 // In single threaded mode we skip the pending tree and commit directly to the | 4028 // In single threaded mode we skip the pending tree and commit directly to the |
4028 // active tree. | 4029 // active tree. |
4029 return !task_runner_provider_->HasImplThread(); | 4030 return !task_runner_provider_->HasImplThread(); |
4030 } | 4031 } |
4031 | 4032 |
4032 } // namespace cc | 4033 } // namespace cc |
OLD | NEW |