summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc')
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index 425990c..1701b83 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -229,7 +229,9 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
const GURL& active_url,
GpuChannelHost* host,
const Attributes& attributes,
+#if !defined(OS_CHROMEOS)
bool bind_generates_resources,
+#endif
bool lose_context_when_out_of_memory,
const SharedMemoryLimits& limits,
WebGraphicsContext3DCommandBufferImpl* share_context)
@@ -247,7 +249,9 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
weak_ptr_factory_(this),
initialized_(false),
gl_(NULL),
+#if !defined(OS_CHROMEOS)
bind_generates_resources_(bind_generates_resources),
+#endif
lose_context_when_out_of_memory_(lose_context_when_out_of_memory),
mem_limits_(limits),
flush_id_(0) {
@@ -354,6 +358,10 @@ bool WebGraphicsContext3DCommandBufferImpl::InitializeCommandBuffer(
attribs.push_back(attributes_.failIfMajorPerformanceCaveat ? 1 : 0);
attribs.push_back(LOSE_CONTEXT_WHEN_OUT_OF_MEMORY);
attribs.push_back(lose_context_when_out_of_memory_ ? 1 : 0);
+#if defined(OS_CHROMEOS)
+ attribs.push_back(BIND_GENERATES_RESOURCES);
+ attribs.push_back(0);
+#endif
attribs.push_back(NONE);
// Create a proxy to a command buffer in the GPU process.
@@ -428,11 +436,19 @@ bool WebGraphicsContext3DCommandBufferImpl::CreateContext(bool onscreen) {
DCHECK(host_.get());
// Create the object exposing the OpenGL API.
+#if defined(OS_CHROMEOS)
+ bool bind_generates_resources = false;
+#endif
+
real_gl_.reset(
new gpu::gles2::GLES2Implementation(gles2_helper_.get(),
gles2_share_group,
transfer_buffer_.get(),
+#if defined(OS_CHROMEOS)
+ bind_generates_resources,
+#else
bind_generates_resources_,
+#endif
lose_context_when_out_of_memory_,
command_buffer_.get()));
gl_ = real_gl_.get();
@@ -1205,14 +1221,17 @@ WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
if (share_context && share_context->IsCommandBufferContextLost())
return NULL;
-
+#if !defined(OS_CHROMEOS)
bool bind_generates_resources = false;
+#endif
return new WebGraphicsContext3DCommandBufferImpl(
0,
active_url,
host,
attributes,
+#if !defined(OS_CHROMEOS)
bind_generates_resources,
+#endif
lose_context_when_out_of_memory,
limits,
share_context);