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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.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: Incorporate code reviews 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #ifndef GL_GLEXT_PROTOTYPES 8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES 1 9 #define GL_GLEXT_PROTOTYPES 1
10 #endif 10 #endif
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 bind_generates_resources_, 474 bind_generates_resources_,
475 NULL)); 475 NULL));
476 gl_ = real_gl_.get(); 476 gl_ = real_gl_.get();
477 477
478 if (attributes_.shareResources) { 478 if (attributes_.shareResources) {
479 // Don't add ourselves to the list before others can get to our ShareGroup. 479 // Don't add ourselves to the list before others can get to our ShareGroup.
480 g_all_shared_contexts.Pointer()->insert(this); 480 g_all_shared_contexts.Pointer()->insert(this);
481 lock.reset(); 481 lock.reset();
482 } 482 }
483 483
484 size_t gl_mapped_memory_limit = gpu::gles2::GLES2Implementation::kNoLimit;
485 #if defined(OS_ANDROID)
486 gl_mapped_memory_limit = mapped_memory_limit_;
487 #endif
piman 2013/08/30 03:31:07 noooo! This is taking the problem upside down. Y
488
484 if (!real_gl_->Initialize( 489 if (!real_gl_->Initialize(
485 start_transfer_buffer_size_, 490 start_transfer_buffer_size_,
486 min_transfer_buffer_size_, 491 min_transfer_buffer_size_,
487 max_transfer_buffer_size_, 492 max_transfer_buffer_size_,
488 mapped_memory_limit_)) { 493 gl_mapped_memory_limit)) {
489 return false; 494 return false;
490 } 495 }
491 496
492 if (CommandLine::ForCurrentProcess()->HasSwitch( 497 if (CommandLine::ForCurrentProcess()->HasSwitch(
493 switches::kEnableGpuClientTracing)) { 498 switches::kEnableGpuClientTracing)) {
494 trace_gl_.reset(new gpu::gles2::GLES2TraceImplementation(gl_)); 499 trace_gl_.reset(new gpu::gles2::GLES2TraceImplementation(gl_));
495 gl_ = trace_gl_.get(); 500 gl_ = trace_gl_.get();
496 } 501 }
497 502
498 return true; 503 return true;
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 1596
1592 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1597 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1593 const std::string& message, int id) { 1598 const std::string& message, int id) {
1594 if (error_message_callback_) { 1599 if (error_message_callback_) {
1595 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1600 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1596 error_message_callback_->onErrorMessage(str, id); 1601 error_message_callback_->onErrorMessage(str, id);
1597 } 1602 }
1598 } 1603 }
1599 1604
1600 } // namespace content 1605 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698