Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 916723002: cc: Add threaded GPU rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 resource_provider_.get()); 2021 resource_provider_.get());
2022 return; 2022 return;
2023 } 2023 }
2024 2024
2025 if (use_gpu_rasterization_) { 2025 if (use_gpu_rasterization_) {
2026 *resource_pool = 2026 *resource_pool =
2027 ResourcePool::Create(resource_provider_.get(), GL_TEXTURE_2D); 2027 ResourcePool::Create(resource_provider_.get(), GL_TEXTURE_2D);
2028 2028
2029 *tile_task_worker_pool = GpuTileTaskWorkerPool::Create( 2029 *tile_task_worker_pool = GpuTileTaskWorkerPool::Create(
2030 task_runner, TileTaskWorkerPool::GetTaskGraphRunner(), 2030 task_runner, TileTaskWorkerPool::GetTaskGraphRunner(),
2031 resource_provider_.get()); 2031 static_cast<GpuRasterizer*>(rasterizer_.get()));
2032 return; 2032 return;
2033 } 2033 }
2034 2034
2035 if (GetRendererCapabilities().using_image) { 2035 if (GetRendererCapabilities().using_image) {
2036 unsigned image_target = settings_.use_image_texture_target; 2036 unsigned image_target = settings_.use_image_texture_target;
2037 DCHECK_IMPLIES( 2037 DCHECK_IMPLIES(
2038 image_target == GL_TEXTURE_RECTANGLE_ARB, 2038 image_target == GL_TEXTURE_RECTANGLE_ARB,
2039 context_provider->ContextCapabilities().gpu.texture_rectangle); 2039 context_provider->ContextCapabilities().gpu.texture_rectangle);
2040 DCHECK_IMPLIES( 2040 DCHECK_IMPLIES(
2041 image_target == GL_TEXTURE_EXTERNAL_OES, 2041 image_target == GL_TEXTURE_EXTERNAL_OES,
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 } 3508 }
3509 3509
3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3511 std::vector<PictureLayerImpl*>::iterator it = 3511 std::vector<PictureLayerImpl*>::iterator it =
3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3513 DCHECK(it != picture_layers_.end()); 3513 DCHECK(it != picture_layers_.end());
3514 picture_layers_.erase(it); 3514 picture_layers_.erase(it);
3515 } 3515 }
3516 3516
3517 } // namespace cc 3517 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698