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

Unified 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: replace use_image_external+use_texture_rectangle with a texture target 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.h » ('j') | cc/trees/layer_tree_settings.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 10b06854b8fb1f5367eb3c08021d2442493aaf66..9aa83ed0ba569e37edac7f9ea7fafa262875cdf8 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2017,15 +2017,11 @@ void LayerTreeHostImpl::CreateResourceAndRasterWorkerPool(
}
if (GetRendererCapabilities().using_image) {
- unsigned image_target = GL_TEXTURE_2D;
-#if defined(OS_MACOSX)
- // GL_TEXTURE_RECTANGLE_ARB target is required by IOSurface backed images.
- DCHECK(context_provider->ContextCapabilities().gpu.texture_rectangle);
- image_target = GL_TEXTURE_RECTANGLE_ARB;
-#endif
- if (settings_.use_image_external) {
+ unsigned image_target = settings_.image_texture_target;
+ if (image_target == GL_TEXTURE_RECTANGLE_ARB) {
reveman 2014/12/03 15:57:19 Please remove if/else statements and use DCHECK_IM
+ DCHECK(context_provider->ContextCapabilities().gpu.texture_rectangle);
+ } else if (image_target == GL_TEXTURE_EXTERNAL_OES) {
DCHECK(context_provider->ContextCapabilities().gpu.egl_image_external);
- image_target = GL_TEXTURE_EXTERNAL_OES;
}
if (settings_.use_zero_copy || IsSynchronousSingleThreaded()) {
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.h » ('j') | cc/trees/layer_tree_settings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698