Index: android_webview/browser/hardware_renderer.cc |
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc |
index 818d3c5c99aa9cbfb23464a3da96c36c8fc60a9e..e9418583b3913d45f5274042c3b339e218aa554f 100644 |
--- a/android_webview/browser/hardware_renderer.cc |
+++ b/android_webview/browser/hardware_renderer.cc |
@@ -20,6 +20,7 @@ |
#include "cc/trees/layer_tree_host.h" |
#include "cc/trees/layer_tree_settings.h" |
#include "gpu/command_buffer/client/gl_in_process_context.h" |
+#include "gpu/command_buffer/common/gles2_cmd_utils.h" |
#include "ui/gfx/frame_time.h" |
#include "ui/gfx/geometry/rect_conversions.h" |
#include "ui/gfx/geometry/rect_f.h" |
@@ -46,10 +47,11 @@ scoped_refptr<cc::ContextProvider> CreateContext( |
attributes.stencil = false; |
attributes.shareResources = true; |
attributes.noAutomaticFlushes = true; |
- gpu::GLInProcessContextAttribs in_process_attribs; |
- WebGraphicsContext3DInProcessCommandBufferImpl::ConvertAttributes( |
- attributes, &in_process_attribs); |
- in_process_attribs.lose_context_when_out_of_memory = 1; |
+ gpu::gles2::ContextCreationAttribHelper attribs_for_gles2; |
+ WebGraphicsContext3DImpl::ConvertAttributes( |
+ attributes, &attribs_for_gles2); |
+ attribs_for_gles2.lose_context_when_out_of_memory_ = true; |
+ attribs_for_gles2.bind_generates_resource_ = false; |
piman
2014/08/08 20:56:34
nit: move this in WebGraphicsContext3DImpl::Conver
|
scoped_ptr<gpu::GLInProcessContext> context( |
gpu::GLInProcessContext::Create(service, |
@@ -59,7 +61,7 @@ scoped_refptr<cc::ContextProvider> CreateContext( |
surface->GetSize(), |
share_context, |
false /* share_resources */, |
- in_process_attribs, |
+ attribs_for_gles2, |
gpu_preference)); |
DCHECK(context.get()); |