| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/common/gpu/client/context_provider_command_buffer.h" | 5 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // workarounds_.enable_chromium_fast_npot_mo8_textures which controls | 270 // workarounds_.enable_chromium_fast_npot_mo8_textures which controls |
| 271 // GL_CHROMIUM_fast_NPOT_MO8_textures | 271 // GL_CHROMIUM_fast_NPOT_MO8_textures |
| 272 caps.fast_npot_mo8_textures = | 272 caps.fast_npot_mo8_textures = |
| 273 extension_set.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; | 273 extension_set.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; |
| 274 | 274 |
| 275 caps.egl_image_external = | 275 caps.egl_image_external = |
| 276 extension_set.count("GL_OES_EGL_image_external") > 0; | 276 extension_set.count("GL_OES_EGL_image_external") > 0; |
| 277 | 277 |
| 278 caps.texture_format_bgra8888 = | 278 caps.texture_format_bgra8888 = |
| 279 extension_set.count("GL_EXT_texture_format_BGRA8888") > 0; | 279 extension_set.count("GL_EXT_texture_format_BGRA8888") > 0; |
| 280 |
| 281 caps.texture_format_etc1 = |
| 282 extension_set.count("GL_OES_compressed_ETC1_RGB8_texture") > 0; |
| 283 |
| 280 caps.texture_rectangle = extension_set.count("GL_ARB_texture_rectangle") > 0; | 284 caps.texture_rectangle = extension_set.count("GL_ARB_texture_rectangle") > 0; |
| 281 | 285 |
| 282 caps.post_sub_buffer = extension_set.count("GL_CHROMIUM_post_sub_buffer") > 0; | 286 caps.post_sub_buffer = extension_set.count("GL_CHROMIUM_post_sub_buffer") > 0; |
| 283 | 287 |
| 284 // TODO(jamesr): This is unconditionally true on mac, no need to test for it | 288 // TODO(jamesr): This is unconditionally true on mac, no need to test for it |
| 285 // at runtime. | 289 // at runtime. |
| 286 caps.iosurface = extension_set.count("GL_CHROMIUM_iosurface") > 0; | 290 caps.iosurface = extension_set.count("GL_CHROMIUM_iosurface") > 0; |
| 287 | 291 |
| 288 caps.texture_usage = extension_set.count("GL_ANGLE_texture_usage") > 0; | 292 caps.texture_usage = extension_set.count("GL_ANGLE_texture_usage") > 0; |
| 289 caps.texture_storage = extension_set.count("GL_EXT_texture_storage") > 0; | 293 caps.texture_storage = extension_set.count("GL_EXT_texture_storage") > 0; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 329 |
| 326 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( | 330 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( |
| 327 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { | 331 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { |
| 328 DCHECK(context_thread_checker_.CalledOnValidThread()); | 332 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 329 DCHECK(memory_policy_changed_callback_.is_null() || | 333 DCHECK(memory_policy_changed_callback_.is_null() || |
| 330 memory_policy_changed_callback.is_null()); | 334 memory_policy_changed_callback.is_null()); |
| 331 memory_policy_changed_callback_ = memory_policy_changed_callback; | 335 memory_policy_changed_callback_ = memory_policy_changed_callback; |
| 332 } | 336 } |
| 333 | 337 |
| 334 } // namespace content | 338 } // namespace content |
| OLD | NEW |