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

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

Issue 766663005: cc: zero/one-copy based on shared memory on IOS uses GL_TEXTURE_2D, not GL_TEXTURE_RECTANGLE_ARB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac build Created 6 years 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 2003
2004 *raster_worker_pool = 2004 *raster_worker_pool =
2005 GpuRasterWorkerPool::Create(task_runner, 2005 GpuRasterWorkerPool::Create(task_runner,
2006 context_provider, 2006 context_provider,
2007 resource_provider_.get(), 2007 resource_provider_.get(),
2008 settings_.use_distance_field_text); 2008 settings_.use_distance_field_text);
2009 return; 2009 return;
2010 } 2010 }
2011 2011
2012 if (GetRendererCapabilities().using_image) { 2012 if (GetRendererCapabilities().using_image) {
2013 unsigned image_target = GL_TEXTURE_2D; 2013 unsigned image_target = settings_.use_image_texture_target;
2014 #if defined(OS_MACOSX) 2014 DCHECK_IMPLIES(
2015 // GL_TEXTURE_RECTANGLE_ARB target is required by IOSurface backed images. 2015 image_target == GL_TEXTURE_RECTANGLE_ARB,
2016 DCHECK(context_provider->ContextCapabilities().gpu.texture_rectangle); 2016 context_provider->ContextCapabilities().gpu.texture_rectangle);
2017 image_target = GL_TEXTURE_RECTANGLE_ARB; 2017 DCHECK_IMPLIES(
2018 #endif 2018 image_target == GL_TEXTURE_EXTERNAL_OES,
2019 if (settings_.use_image_external) { 2019 context_provider->ContextCapabilities().gpu.egl_image_external);
2020 DCHECK(context_provider->ContextCapabilities().gpu.egl_image_external);
2021 image_target = GL_TEXTURE_EXTERNAL_OES;
2022 }
2023 2020
2024 if (settings_.use_zero_copy || IsSynchronousSingleThreaded()) { 2021 if (settings_.use_zero_copy || IsSynchronousSingleThreaded()) {
2025 *resource_pool = 2022 *resource_pool =
2026 ResourcePool::Create(resource_provider_.get(), image_target, 2023 ResourcePool::Create(resource_provider_.get(), image_target,
2027 resource_provider_->best_texture_format()); 2024 resource_provider_->best_texture_format());
2028 2025
2029 TaskGraphRunner* task_graph_runner; 2026 TaskGraphRunner* task_graph_runner;
2030 if (IsSynchronousSingleThreaded()) { 2027 if (IsSynchronousSingleThreaded()) {
2031 DCHECK(!single_thread_synchronous_task_graph_runner_); 2028 DCHECK(!single_thread_synchronous_task_graph_runner_);
2032 single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner); 2029 single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner);
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3487 } 3484 }
3488 3485
3489 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3486 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3490 std::vector<PictureLayerImpl*>::iterator it = 3487 std::vector<PictureLayerImpl*>::iterator it =
3491 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3488 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3492 DCHECK(it != picture_layers_.end()); 3489 DCHECK(it != picture_layers_.end());
3493 picture_layers_.erase(it); 3490 picture_layers_.erase(it);
3494 } 3491 }
3495 3492
3496 } // namespace cc 3493 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698