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

Unified Diff: webkit/common/gpu/context_provider_in_process.cc

Issue 455083002: Add memory limits struct to in-process context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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: webkit/common/gpu/context_provider_in_process.cc
diff --git a/webkit/common/gpu/context_provider_in_process.cc b/webkit/common/gpu/context_provider_in_process.cc
index 3785d38add9fe0ed20caa9234da8837aa6bb8adf..e4ca1d8a42cfdb50838f485c9387677a0c631795 100644
--- a/webkit/common/gpu/context_provider_in_process.cc
+++ b/webkit/common/gpu/context_provider_in_process.cc
@@ -110,6 +110,13 @@ bool ContextProviderInProcess::BindToCurrentThread() {
void ContextProviderInProcess::InitializeCapabilities() {
capabilities_.gpu = context3d_->GetImplementation()->capabilities();
+
+ size_t mapped_memory_limit = context3d_->GetMappedMemoryLimit();
+ capabilities_.max_transfer_buffer_usage_bytes =
+ mapped_memory_limit ==
+ WebGraphicsContext3DInProcessCommandBufferImpl::kNoLimit
+ ? std::numeric_limits<size_t>::max()
+ : mapped_memory_limit;
}
cc::ContextProvider::Capabilities

Powered by Google App Engine
This is Rietveld 408576698