| Index: content/browser/renderer_host/image_transport_factory_android.cc
|
| diff --git a/content/browser/renderer_host/image_transport_factory_android.cc b/content/browser/renderer_host/image_transport_factory_android.cc
|
| index 135e188cf3caccd3122143c03e1e93a6924be932..5cfdbcf2e9832b77265c5aeffed0951c511b96dc 100644
|
| --- a/content/browser/renderer_host/image_transport_factory_android.cc
|
| +++ b/content/browser/renderer_host/image_transport_factory_android.cc
|
| @@ -13,6 +13,7 @@
|
| #include "content/common/gpu/gpu_process_launch_causes.h"
|
| #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| +#include "ui/gfx/android/device_display_info.h"
|
| #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
|
|
|
| namespace content {
|
| @@ -100,10 +101,22 @@ CmdBufferImageTransportFactory::CmdBufferImageTransportFactory() {
|
| url,
|
| factory,
|
| swap_client));
|
| - context_->InitializeWithDefaultBufferSizes(
|
| + static const size_t kBytesPerPixel = 4;
|
| + gfx::DeviceDisplayInfo display_info;
|
| + size_t full_screen_texture_size_in_bytes =
|
| + display_info.GetDisplayHeight() *
|
| + display_info.GetDisplayWidth() *
|
| + kBytesPerPixel;
|
| + context_->Initialize(
|
| attrs,
|
| false,
|
| - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE);
|
| + CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE,
|
| + 64 * 1024, // command buffer size
|
| + std::min(full_screen_texture_size_in_bytes,
|
| + kDefaultStartTransferBufferSize),
|
| + kDefaultMinTransferBufferSize,
|
| + std::min(3 * full_screen_texture_size_in_bytes,
|
| + kDefaultMaxTransferBufferSize));
|
|
|
| if (context_->makeContextCurrent())
|
| context_->pushGroupMarkerEXT(
|
|
|