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

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

Issue 198703002: Add GL_TEXTURE_EXTERNAL_OES as supported texture target for CHROMIUM_map_image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | ui/gl/gl_image_shm.h » ('j') | ui/gl/gl_image_shm.h » ('J')
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // equal here, as this is ideal when using transfer buffers. When not using 103 // equal here, as this is ideal when using transfer buffers. When not using
104 // transfer buffers we should still limit raster to something similar, to 104 // transfer buffers we should still limit raster to something similar, to
105 // preserve caching behavior (and limit memory waste when priorities change). 105 // preserve caching behavior (and limit memory waste when priorities change).
106 return GetMaxTransferBufferUsageBytes(context_provider); 106 return GetMaxTransferBufferUsageBytes(context_provider);
107 } 107 }
108 108
109 unsigned GetMapImageTextureTarget(cc::ContextProvider* context_provider) { 109 unsigned GetMapImageTextureTarget(cc::ContextProvider* context_provider) {
110 if (!context_provider) 110 if (!context_provider)
111 return GL_TEXTURE_2D; 111 return GL_TEXTURE_2D;
112 112
113 // TODO(reveman): Determine if GL_TEXTURE_EXTERNAL_OES works well on
114 // Android before we enable this. crbug.com/322780
115 #if !defined(OS_ANDROID)
116 if (context_provider->ContextCapabilities().gpu.egl_image_external) 113 if (context_provider->ContextCapabilities().gpu.egl_image_external)
117 return GL_TEXTURE_EXTERNAL_OES; 114 return GL_TEXTURE_EXTERNAL_OES;
118 if (context_provider->ContextCapabilities().gpu.texture_rectangle) 115 if (context_provider->ContextCapabilities().gpu.texture_rectangle)
119 return GL_TEXTURE_RECTANGLE_ARB; 116 return GL_TEXTURE_RECTANGLE_ARB;
120 #endif
121 117
122 return GL_TEXTURE_2D; 118 return GL_TEXTURE_2D;
123 } 119 }
124 120
125 } // namespace 121 } // namespace
126 122
127 namespace cc { 123 namespace cc {
128 124
129 class LayerTreeHostImplTimeSourceAdapter : public TimeSourceClient { 125 class LayerTreeHostImplTimeSourceAdapter : public TimeSourceClient {
130 public: 126 public:
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 swap_promise_monitor_.erase(monitor); 3025 swap_promise_monitor_.erase(monitor);
3030 } 3026 }
3031 3027
3032 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3028 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3033 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3029 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3034 for (; it != swap_promise_monitor_.end(); it++) 3030 for (; it != swap_promise_monitor_.end(); it++)
3035 (*it)->OnSetNeedsRedrawOnImpl(); 3031 (*it)->OnSetNeedsRedrawOnImpl();
3036 } 3032 }
3037 3033
3038 } // namespace cc 3034 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_image_shm.h » ('j') | ui/gl/gl_image_shm.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698