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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 caps.fast_npot_mo8_textures = | 258 caps.fast_npot_mo8_textures = |
259 extension_set.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; | 259 extension_set.count("GL_CHROMIUM_fast_NPOT_MO8_textures") > 0; |
260 | 260 |
261 caps.egl_image_external = | 261 caps.egl_image_external = |
262 extension_set.count("GL_OES_EGL_image_external") > 0; | 262 extension_set.count("GL_OES_EGL_image_external") > 0; |
263 | 263 |
264 caps.texture_format_bgra8888 = | 264 caps.texture_format_bgra8888 = |
265 extension_set.count("GL_EXT_texture_format_BGRA8888") > 0; | 265 extension_set.count("GL_EXT_texture_format_BGRA8888") > 0; |
266 caps.texture_rectangle = extension_set.count("GL_ARB_texture_rectangle") > 0; | 266 caps.texture_rectangle = extension_set.count("GL_ARB_texture_rectangle") > 0; |
267 | 267 |
| 268 caps.post_sub_buffer = extension_set.count("GL_CHROMIUM_post_sub_buffer") > 0; |
| 269 |
268 // TODO(jamesr): This is unconditionally true on mac, no need to test for it | 270 // TODO(jamesr): This is unconditionally true on mac, no need to test for it |
269 // at runtime. | 271 // at runtime. |
270 caps.iosurface = extension_set.count("GL_CHROMIUM_iosurface") > 0; | 272 caps.iosurface = extension_set.count("GL_CHROMIUM_iosurface") > 0; |
271 | 273 |
272 caps.texture_usage = extension_set.count("GL_ANGLE_texture_usage") > 0; | 274 caps.texture_usage = extension_set.count("GL_ANGLE_texture_usage") > 0; |
273 caps.texture_storage = extension_set.count("GL_EXT_texture_storage") > 0; | 275 caps.texture_storage = extension_set.count("GL_EXT_texture_storage") > 0; |
274 | 276 |
275 caps.discard_framebuffer = | 277 caps.discard_framebuffer = |
276 extension_set.count("GL_EXT_discard_framebuffer") > 0; | 278 extension_set.count("GL_EXT_discard_framebuffer") > 0; |
277 size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit(); | 279 size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit(); |
(...skipping 30 matching lines...) Expand all Loading... |
308 | 310 |
309 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( | 311 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( |
310 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { | 312 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { |
311 DCHECK(context_thread_checker_.CalledOnValidThread()); | 313 DCHECK(context_thread_checker_.CalledOnValidThread()); |
312 DCHECK(memory_policy_changed_callback_.is_null() || | 314 DCHECK(memory_policy_changed_callback_.is_null() || |
313 memory_policy_changed_callback.is_null()); | 315 memory_policy_changed_callback.is_null()); |
314 memory_policy_changed_callback_ = memory_policy_changed_callback; | 316 memory_policy_changed_callback_ = memory_policy_changed_callback; |
315 } | 317 } |
316 | 318 |
317 } // namespace content | 319 } // namespace content |
OLD | NEW |