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

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: make "external" and "rectangle" a global constant 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
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 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 2010
2011 *raster_worker_pool = 2011 *raster_worker_pool =
2012 GpuRasterWorkerPool::Create(task_runner, 2012 GpuRasterWorkerPool::Create(task_runner,
2013 context_provider, 2013 context_provider,
2014 resource_provider_.get(), 2014 resource_provider_.get(),
2015 settings_.use_distance_field_text); 2015 settings_.use_distance_field_text);
2016 return; 2016 return;
2017 } 2017 }
2018 2018
2019 if (GetRendererCapabilities().using_image) { 2019 if (GetRendererCapabilities().using_image) {
2020 unsigned image_target = GL_TEXTURE_2D; 2020 unsigned image_target = settings_.use_image_texture_target;
2021 #if defined(OS_MACOSX) 2021 DCHECK_IMPLIES(
2022 // GL_TEXTURE_RECTANGLE_ARB target is required by IOSurface backed images. 2022 image_target == GL_TEXTURE_RECTANGLE_ARB,
2023 DCHECK(context_provider->ContextCapabilities().gpu.texture_rectangle); 2023 context_provider->ContextCapabilities().gpu.texture_rectangle);
2024 image_target = GL_TEXTURE_RECTANGLE_ARB; 2024 DCHECK_IMPLIES(
2025 #endif 2025 image_target == GL_TEXTURE_EXTERNAL_OES,
2026 if (settings_.use_image_external) { 2026 context_provider->ContextCapabilities().gpu.egl_image_external);
2027 DCHECK(context_provider->ContextCapabilities().gpu.egl_image_external);
2028 image_target = GL_TEXTURE_EXTERNAL_OES;
2029 }
2030 2027
2031 if (settings_.use_zero_copy || IsSynchronousSingleThreaded()) { 2028 if (settings_.use_zero_copy || IsSynchronousSingleThreaded()) {
2032 *resource_pool = 2029 *resource_pool =
2033 ResourcePool::Create(resource_provider_.get(), image_target, 2030 ResourcePool::Create(resource_provider_.get(), image_target,
2034 resource_provider_->best_texture_format()); 2031 resource_provider_->best_texture_format());
2035 2032
2036 TaskGraphRunner* task_graph_runner; 2033 TaskGraphRunner* task_graph_runner;
2037 if (IsSynchronousSingleThreaded()) { 2034 if (IsSynchronousSingleThreaded()) {
2038 DCHECK(!single_thread_synchronous_task_graph_runner_); 2035 DCHECK(!single_thread_synchronous_task_graph_runner_);
2039 single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner); 2036 single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner);
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
3486 } 3483 }
3487 3484
3488 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3485 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3489 std::vector<PictureLayerImpl*>::iterator it = 3486 std::vector<PictureLayerImpl*>::iterator it =
3490 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3487 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3491 DCHECK(it != picture_layers_.end()); 3488 DCHECK(it != picture_layers_.end());
3492 picture_layers_.erase(it); 3489 picture_layers_.erase(it);
3493 } 3490 }
3494 3491
3495 } // namespace cc 3492 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.h » ('j') | content/browser/renderer_host/render_process_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698