Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: components/mus/gles2/command_buffer_driver.cc

Issue 2106103005: Revert of Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1c35904e9f63b9c82b844f72b8a857216ec735bc..b3821b9f4dec1acc7f5489955097dfc64cdf761a 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -83,7 +83,6 @@
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) {
@@ -117,9 +116,9 @@
if (!surface_.get())
return false;
- // TODO(piman): virtual contexts.
- context_ = gl::init::CreateGLContext(
- gpu_state_->share_group(), surface_.get(), attrib_helper.gpu_preference);
+ // TODO(piman): virtual contexts, gpu preference.
+ context_ = gl::init::CreateGLContext(gpu_state_->share_group(),
+ surface_.get(), gl::PreferIntegratedGpu);
if (!context_.get())
return false;
@@ -162,8 +161,8 @@
gpu::gles2::DisallowedFeatures disallowed_features;
- if (!decoder_->Initialize(surface_, context_, offscreen, disallowed_features,
- attrib_helper))
+ if (!decoder_->Initialize(surface_, context_, offscreen, gfx::Size(1, 1),
+ disallowed_features, attrib_helper))
return false;
command_buffer_->SetPutOffsetChangeCallback(base::Bind(
« no previous file with comments | « components/display_compositor/yuv_readback_unittest.cc ('k') | components/mus/public/cpp/lib/gles2_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698