| Index: components/mus/gles2/command_buffer_driver.cc
|
| diff --git a/components/mus/gles2/command_buffer_driver.cc b/components/mus/gles2/command_buffer_driver.cc
|
| index b3821b9f4dec1acc7f5489955097dfc64cdf761a..1c35904e9f63b9c82b844f72b8a857216ec735bc 100644
|
| --- a/components/mus/gles2/command_buffer_driver.cc
|
| +++ b/components/mus/gles2/command_buffer_driver.cc
|
| @@ -83,6 +83,7 @@ bool CommandBufferDriver::Initialize(
|
| gpu::gles2::ContextCreationAttribHelper attrib_helper;
|
| if (!attrib_helper.Parse(attribs.storage()))
|
| return false;
|
| + // TODO(piman): attribs can't currently represent gpu_preference.
|
|
|
| const bool offscreen = widget_ == gfx::kNullAcceleratedWidget;
|
| if (offscreen) {
|
| @@ -116,9 +117,9 @@ bool CommandBufferDriver::Initialize(
|
| if (!surface_.get())
|
| return false;
|
|
|
| - // TODO(piman): virtual contexts, gpu preference.
|
| - context_ = gl::init::CreateGLContext(gpu_state_->share_group(),
|
| - surface_.get(), gl::PreferIntegratedGpu);
|
| + // TODO(piman): virtual contexts.
|
| + context_ = gl::init::CreateGLContext(
|
| + gpu_state_->share_group(), surface_.get(), attrib_helper.gpu_preference);
|
| if (!context_.get())
|
| return false;
|
|
|
| @@ -161,8 +162,8 @@ bool CommandBufferDriver::Initialize(
|
|
|
| gpu::gles2::DisallowedFeatures disallowed_features;
|
|
|
| - if (!decoder_->Initialize(surface_, context_, offscreen, gfx::Size(1, 1),
|
| - disallowed_features, attrib_helper))
|
| + if (!decoder_->Initialize(surface_, context_, offscreen, disallowed_features,
|
| + attrib_helper))
|
| return false;
|
|
|
| command_buffer_->SetPutOffsetChangeCallback(base::Bind(
|
|
|