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

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

Issue 22900018: cc: Set the mapped memory reclaim limit for the renderer compositor on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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.max_transfer_buffer_usage_bytes = context3d_->GetMappedMemoryLimit();
268
267 capabilities_ = caps; 269 capabilities_ = caps;
268 } 270 }
269 271
270 272
271 bool ContextProviderCommandBuffer::DestroyedOnMainThread() { 273 bool ContextProviderCommandBuffer::DestroyedOnMainThread() {
272 DCHECK(main_thread_checker_.CalledOnValidThread()); 274 DCHECK(main_thread_checker_.CalledOnValidThread());
273 275
274 base::AutoLock lock(main_thread_lock_); 276 base::AutoLock lock(main_thread_lock_);
275 return destroyed_; 277 return destroyed_;
276 } 278 }
(...skipping 16 matching lines...) Expand all
293 295
294 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback( 296 void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback(
295 const MemoryPolicyChangedCallback& memory_policy_changed_callback) { 297 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
296 DCHECK(context_thread_checker_.CalledOnValidThread()); 298 DCHECK(context_thread_checker_.CalledOnValidThread());
297 DCHECK(memory_policy_changed_callback_.is_null() || 299 DCHECK(memory_policy_changed_callback_.is_null() ||
298 memory_policy_changed_callback.is_null()); 300 memory_policy_changed_callback.is_null());
299 memory_policy_changed_callback_ = memory_policy_changed_callback; 301 memory_policy_changed_callback_ = memory_policy_changed_callback;
300 } 302 }
301 303
302 } // namespace content 304 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698