Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: content/common/gpu/client/context_provider_command_buffer.cc

Issue 23601013: cc: Invalidate framebuffer contents when clearing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« cc/output/gl_renderer.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« cc/output/gl_renderer.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698