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

Unified 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: feedback Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/context_provider_command_buffer.cc
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index 2c5b4da55fc9cfb091e068ed760b147c013ffc2a..30bb2fbaa82a76b89d52cbfaf4ecc9cf56d466c8 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -264,6 +264,11 @@ void ContextProviderCommandBuffer::InitializeCapabilities() {
caps.texture_usage = extension_set.count("GL_ANGLE_texture_usage") > 0;
caps.texture_storage = extension_set.count("GL_EXT_texture_storage") > 0;
+ size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit();
+ caps.max_transfer_buffer_usage_bytes =
+ mapped_memory_limit == WebGraphicsContext3DCommandBufferImpl::kNoLimit
+ ? std::numeric_limits<size_t>::max() : mapped_memory_limit;
+
capabilities_ = caps;
}

Powered by Google App Engine
This is Rietveld 408576698