Chromium Code Reviews| 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 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1939 client_->UpdateRendererCapabilitiesOnImplThread(); | 1939 client_->UpdateRendererCapabilitiesOnImplThread(); |
| 1940 } | 1940 } |
| 1941 | 1941 |
| 1942 void LayerTreeHostImpl::CreateAndSetTileManager() { | 1942 void LayerTreeHostImpl::CreateAndSetTileManager() { |
| 1943 DCHECK(!tile_manager_); | 1943 DCHECK(!tile_manager_); |
| 1944 DCHECK(settings_.impl_side_painting); | 1944 DCHECK(settings_.impl_side_painting); |
| 1945 DCHECK(output_surface_); | 1945 DCHECK(output_surface_); |
| 1946 DCHECK(resource_provider_); | 1946 DCHECK(resource_provider_); |
| 1947 DCHECK(proxy_->ImplThreadTaskRunner()); | 1947 DCHECK(proxy_->ImplThreadTaskRunner()); |
| 1948 | 1948 |
| 1949 ContextProvider* context_provider = output_surface_->context_provider(); | 1949 scoped_refptr<ContextProvider> context_provider = |
|
danakj
2014/08/25 20:25:01
I don't see anything this is passed to needing a s
dcheng
2014/08/25 20:56:58
This is the tool's logic kicking in--context_provi
| |
| 1950 output_surface_->context_provider(); | |
| 1950 transfer_buffer_memory_limit_ = | 1951 transfer_buffer_memory_limit_ = |
| 1951 GetMaxTransferBufferUsageBytes(context_provider); | 1952 GetMaxTransferBufferUsageBytes(context_provider); |
|
danakj
2014/08/25 20:25:01
If not you need .get() here and in most of these p
dcheng
2014/08/25 20:56:58
Yeah, that's the problem with this tool--it's sing
| |
| 1952 | 1953 |
| 1953 if (use_gpu_rasterization_ && context_provider) { | 1954 if (use_gpu_rasterization_ && context_provider) { |
| 1954 resource_pool_ = | 1955 resource_pool_ = |
| 1955 ResourcePool::Create(resource_provider_.get(), | 1956 ResourcePool::Create(resource_provider_.get(), |
| 1956 GL_TEXTURE_2D, | 1957 GL_TEXTURE_2D, |
| 1957 resource_provider_->best_texture_format()); | 1958 resource_provider_->best_texture_format()); |
| 1958 | 1959 |
| 1959 raster_worker_pool_ = | 1960 raster_worker_pool_ = |
| 1960 GpuRasterWorkerPool::Create(proxy_->ImplThreadTaskRunner(), | 1961 GpuRasterWorkerPool::Create(proxy_->ImplThreadTaskRunner(), |
| 1961 context_provider, | 1962 context_provider, |
| (...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3348 } | 3349 } |
| 3349 | 3350 |
| 3350 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3351 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3351 std::vector<PictureLayerImpl*>::iterator it = | 3352 std::vector<PictureLayerImpl*>::iterator it = |
| 3352 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3353 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3353 DCHECK(it != picture_layers_.end()); | 3354 DCHECK(it != picture_layers_.end()); |
| 3354 picture_layers_.erase(it); | 3355 picture_layers_.erase(it); |
| 3355 } | 3356 } |
| 3356 | 3357 |
| 3357 } // namespace cc | 3358 } // namespace cc |
| OLD | NEW |