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

Unified Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 23130004: Enforce a memory limit on MappedMemoryManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More code review feedback incorporated 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/webgraphicscontext3d_command_buffer_impl.cc
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index a4dd1d528db2821f827fb72c7c484994b3e5cd08..ee4b027e9f1dcb96f8a08c7157a174b6cf6e6de6 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -234,7 +234,8 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
command_buffer_size_(0),
start_transfer_buffer_size_(0),
min_transfer_buffer_size_(0),
- max_transfer_buffer_size_(0) {
+ max_transfer_buffer_size_(0),
+ mapped_memory_limit_(gpu::gles2::GLES2Implementation::kNoLimit) {
#if (defined(OS_MACOSX) || defined(OS_WIN)) && !defined(USE_AURA)
// Get ViewMsg_SwapBuffers_ACK from browser for single-threaded path.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -266,7 +267,8 @@ bool WebGraphicsContext3DCommandBufferImpl::InitializeWithDefaultBufferSizes(
kDefaultCommandBufferSize,
kDefaultStartTransferBufferSize,
kDefaultMinTransferBufferSize,
- kDefaultMaxTransferBufferSize);
+ kDefaultMaxTransferBufferSize,
+ gpu::gles2::GLES2Implementation::kNoLimit);
}
bool WebGraphicsContext3DCommandBufferImpl::Initialize(
@@ -276,7 +278,8 @@ bool WebGraphicsContext3DCommandBufferImpl::Initialize(
size_t command_buffer_size,
size_t start_transfer_buffer_size,
size_t min_transfer_buffer_size,
- size_t max_transfer_buffer_size) {
+ size_t max_transfer_buffer_size,
+ size_t mapped_memory_limit) {
TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl::initialize");
attributes_ = attributes;
@@ -297,6 +300,7 @@ bool WebGraphicsContext3DCommandBufferImpl::Initialize(
start_transfer_buffer_size_ = start_transfer_buffer_size;
min_transfer_buffer_size_ = min_transfer_buffer_size;
max_transfer_buffer_size_ = max_transfer_buffer_size;
+ mapped_memory_limit_ = mapped_memory_limit;
piman 2013/08/19 21:44:21 This is set, but never used anywhere. We should ei
kaanb 2013/08/19 21:56:15 Done.
return true;
}

Powered by Google App Engine
This is Rietveld 408576698