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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // The updater can access textures while the GLRenderer is using them. | 183 // The updater can access textures while the GLRenderer is using them. |
184 capabilities_.allow_partial_texture_updates = true; | 184 capabilities_.allow_partial_texture_updates = true; |
185 | 185 |
186 // Check for texture fast paths. Currently we always use MO8 textures, | 186 // Check for texture fast paths. Currently we always use MO8 textures, |
187 // so we only need to avoid POT textures if we have an NPOT fast-path. | 187 // so we only need to avoid POT textures if we have an NPOT fast-path. |
188 capabilities_.avoid_pow2_textures = | 188 capabilities_.avoid_pow2_textures = |
189 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; | 189 extensions.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; |
190 | 190 |
191 capabilities_.using_offscreen_context3d = true; | 191 capabilities_.using_offscreen_context3d = true; |
192 | 192 |
| 193 capabilities_.use_gpu_memory_buffers = |
| 194 extensions.count("GL_CHROMIUM_map_image") > 0; |
| 195 |
193 is_using_bind_uniform_ = | 196 is_using_bind_uniform_ = |
194 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0; | 197 extensions.count("GL_CHROMIUM_bind_uniform_location") > 0; |
195 | 198 |
196 // Make sure scissoring starts as disabled. | 199 // Make sure scissoring starts as disabled. |
197 GLC(context_, context_->disable(GL_SCISSOR_TEST)); | 200 GLC(context_, context_->disable(GL_SCISSOR_TEST)); |
198 DCHECK(!is_scissor_enabled_); | 201 DCHECK(!is_scissor_enabled_); |
199 | 202 |
200 if (!InitializeSharedObjects()) | 203 if (!InitializeSharedObjects()) |
201 return false; | 204 return false; |
202 | 205 |
(...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2797 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); | 2800 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); |
2798 | 2801 |
2799 ReleaseRenderPassTextures(); | 2802 ReleaseRenderPassTextures(); |
2800 } | 2803 } |
2801 | 2804 |
2802 bool GLRenderer::IsContextLost() { | 2805 bool GLRenderer::IsContextLost() { |
2803 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); | 2806 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); |
2804 } | 2807 } |
2805 | 2808 |
2806 } // namespace cc | 2809 } // namespace cc |
OLD | NEW |