Index: content/browser/renderer_host/compositor_impl_android.cc |
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc |
index 4a120522049c0c01aeef71edcda3fd2649765f83..23829a43ae0cbb29e623aed0a51cb82b44d88814 100644 |
--- a/content/browser/renderer_host/compositor_impl_android.cc |
+++ b/content/browser/renderer_host/compositor_impl_android.cc |
@@ -542,13 +542,15 @@ static scoped_ptr<WebGraphicsContext3DCommandBufferImpl> |
CreateGpuProcessViewContext( |
const scoped_refptr<GpuChannelHost>& gpu_channel_host, |
const blink::WebGraphicsContext3D::Attributes attributes, |
- int surface_id) { |
+ int surface_id, |
+ gfx::NativeWindow nativeWindow) { |
GURL url("chrome://gpu/Compositor::createContext3D"); |
static const size_t kBytesPerPixel = 4; |
- gfx::DeviceDisplayInfo display_info; |
+ std::shared_ptr<gfx::DeviceDisplayInfo> |
+ display_info(nativeWindow->GetDeviceDisplayInfo()); |
size_t full_screen_texture_size_in_bytes = |
- display_info.GetDisplayHeight() * |
- display_info.GetDisplayWidth() * |
+ display_info->GetDisplayHeight() * |
+ display_info->GetDisplayWidth() * |
kBytesPerPixel; |
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; |
limits.command_buffer_size = 64 * 1024; |
@@ -643,7 +645,8 @@ void CompositorImpl::CreateOutputSurface() { |
scoped_refptr<GpuChannelHost> gpu_channel_host(factory->GetGpuChannel()); |
scoped_refptr<ContextProviderCommandBuffer> context_provider( |
ContextProviderCommandBuffer::Create( |
- CreateGpuProcessViewContext(gpu_channel_host, attrs, surface_id_), |
+ CreateGpuProcessViewContext(gpu_channel_host, attrs, surface_id_, |
+ root_window_), |
BROWSER_COMPOSITOR_ONSCREEN_CONTEXT)); |
DCHECK(context_provider.get()); |