OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // The updater can access textures while the GLRenderer is using them. | 191 // The updater can access textures while the GLRenderer is using them. |
192 capabilities_.allow_partial_texture_updates = true; | 192 capabilities_.allow_partial_texture_updates = true; |
193 | 193 |
194 // Check for texture fast paths. Currently we always use MO8 textures, | 194 // Check for texture fast paths. Currently we always use MO8 textures, |
195 // so we only need to avoid POT textures if we have an NPOT fast-path. | 195 // so we only need to avoid POT textures if we have an NPOT fast-path. |
196 capabilities_.avoid_pow2_textures = | 196 capabilities_.avoid_pow2_textures = |
197 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; | 197 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; |
198 | 198 |
199 capabilities_.using_offscreen_context3d = true; | 199 capabilities_.using_offscreen_context3d = true; |
200 | 200 |
| 201 capabilities_.using_map_image = |
| 202 extensions.count("GL_CHROMIUM_map_image") > 0 && |
| 203 Settings().use_map_image; |
| 204 |
201 is_using_bind_uniform_ = | 205 is_using_bind_uniform_ = |
202 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0; | 206 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0; |
203 | 207 |
204 if (!InitializeSharedObjects()) | 208 if (!InitializeSharedObjects()) |
205 return false; | 209 return false; |
206 | 210 |
207 // Make sure the viewport and context gets initialized, even if it is to zero. | 211 // Make sure the viewport and context gets initialized, even if it is to zero. |
208 ViewportChanged(); | 212 ViewportChanged(); |
209 return true; | 213 return true; |
210 } | 214 } |
(...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2908 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas | 2912 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas |
2909 // implementation. | 2913 // implementation. |
2910 return gr_context_ && context_->getContextAttributes().stencil; | 2914 return gr_context_ && context_->getContextAttributes().stencil; |
2911 } | 2915 } |
2912 | 2916 |
2913 bool GLRenderer::IsContextLost() { | 2917 bool GLRenderer::IsContextLost() { |
2914 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); | 2918 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); |
2915 } | 2919 } |
2916 | 2920 |
2917 } // namespace cc | 2921 } // namespace cc |
OLD | NEW |