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

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: 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 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = GL_TEXTURE_2D;
2021 if (settings_.use_image_external) {
reveman 2014/12/01 17:03:14 use_image_external means that we should be using T
2021 #if defined(OS_MACOSX) 2022 #if defined(OS_MACOSX)
2022 // GL_TEXTURE_RECTANGLE_ARB target is required by IOSurface backed images. 2023 // GL_TEXTURE_RECTANGLE_ARB target is required by IOSurface backed images.
2023 DCHECK(context_provider->ContextCapabilities().gpu.texture_rectangle); 2024 DCHECK(context_provider->ContextCapabilities().gpu.texture_rectangle);
2024 image_target = GL_TEXTURE_RECTANGLE_ARB; 2025 image_target = GL_TEXTURE_RECTANGLE_ARB;
2025 #endif 2026 #elif defined(OS_ANDROID)
2026 if (settings_.use_image_external) {
2027 DCHECK(context_provider->ContextCapabilities().gpu.egl_image_external); 2027 DCHECK(context_provider->ContextCapabilities().gpu.egl_image_external);
2028 image_target = GL_TEXTURE_EXTERNAL_OES; 2028 image_target = GL_TEXTURE_EXTERNAL_OES;
2029 #endif
2029 } 2030 }
2030 2031
2031 if (settings_.use_zero_copy || IsSynchronousSingleThreaded()) { 2032 if (settings_.use_zero_copy || IsSynchronousSingleThreaded()) {
2032 *resource_pool = 2033 *resource_pool =
2033 ResourcePool::Create(resource_provider_.get(), image_target, 2034 ResourcePool::Create(resource_provider_.get(), image_target,
2034 resource_provider_->best_texture_format()); 2035 resource_provider_->best_texture_format());
2035 2036
2036 TaskGraphRunner* task_graph_runner; 2037 TaskGraphRunner* task_graph_runner;
2037 if (IsSynchronousSingleThreaded()) { 2038 if (IsSynchronousSingleThreaded()) {
2038 DCHECK(!single_thread_synchronous_task_graph_runner_); 2039 DCHECK(!single_thread_synchronous_task_graph_runner_);
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 } 3480 }
3480 3481
3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3482 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3482 std::vector<PictureLayerImpl*>::iterator it = 3483 std::vector<PictureLayerImpl*>::iterator it =
3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3484 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3484 DCHECK(it != picture_layers_.end()); 3485 DCHECK(it != picture_layers_.end());
3485 picture_layers_.erase(it); 3486 picture_layers_.erase(it);
3486 } 3487 }
3487 3488
3488 } // namespace cc 3489 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698