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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 extension_set.count("GL_EXT_texture_format_BGRA8888") > 0; | 257 extension_set.count("GL_EXT_texture_format_BGRA8888") > 0; |
258 caps.texture_rectangle = extension_set.count("GL_ARB_texture_rectangle") > 0; | 258 caps.texture_rectangle = extension_set.count("GL_ARB_texture_rectangle") > 0; |
259 | 259 |
260 // TODO(jamesr): This is unconditionally true on mac, no need to test for it | 260 // TODO(jamesr): This is unconditionally true on mac, no need to test for it |
261 // at runtime. | 261 // at runtime. |
262 caps.iosurface = extension_set.count("GL_CHROMIUM_iosurface") > 0; | 262 caps.iosurface = extension_set.count("GL_CHROMIUM_iosurface") > 0; |
263 | 263 |
264 caps.texture_usage = extension_set.count("GL_ANGLE_texture_usage") > 0; | 264 caps.texture_usage = extension_set.count("GL_ANGLE_texture_usage") > 0; |
265 caps.texture_storage = extension_set.count("GL_EXT_texture_storage") > 0; | 265 caps.texture_storage = extension_set.count("GL_EXT_texture_storage") > 0; |
266 | 266 |
| 267 caps.discard_framebuffer = |
| 268 extension_set.count("GL_EXT_discard_framebuffer") > 0; |
| 269 |
267 capabilities_ = caps; | 270 capabilities_ = caps; |
268 } | 271 } |
269 | 272 |
270 | 273 |
271 bool ContextProviderCommandBuffer::DestroyedOnMainThread() { | 274 bool ContextProviderCommandBuffer::DestroyedOnMainThread() { |
272 DCHECK(main_thread_checker_.CalledOnValidThread()); | 275 DCHECK(main_thread_checker_.CalledOnValidThread()); |
273 | 276 |
274 base::AutoLock lock(main_thread_lock_); | 277 base::AutoLock lock(main_thread_lock_); |
275 return destroyed_; | 278 return destroyed_; |
276 } | 279 } |
(...skipping 16 matching lines...) Expand all Loading... |
293 | 296 |
294 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( | 297 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( |
295 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { | 298 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { |
296 DCHECK(context_thread_checker_.CalledOnValidThread()); | 299 DCHECK(context_thread_checker_.CalledOnValidThread()); |
297 DCHECK(memory_policy_changed_callback_.is_null() || | 300 DCHECK(memory_policy_changed_callback_.is_null() || |
298 memory_policy_changed_callback.is_null()); | 301 memory_policy_changed_callback.is_null()); |
299 memory_policy_changed_callback_ = memory_policy_changed_callback; | 302 memory_policy_changed_callback_ = memory_policy_changed_callback; |
300 } | 303 } |
301 | 304 |
302 } // namespace content | 305 } // namespace content |
OLD | NEW |