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

Unified Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 2497503004: Revert of Refactor context creation parameters into a struct. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « gpu/command_buffer/service/service_utils.cc ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_manager.cc
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index b12fcadcf90b6145f03e5d76ff1af2289125cd72..482efa619e29dd0e39436fe17f2f9ae7fbfd65de 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -34,7 +34,6 @@
#include "gpu/command_buffer/service/image_manager.h"
#include "gpu/command_buffer/service/mailbox_manager_impl.h"
#include "gpu/command_buffer/service/memory_tracking.h"
-#include "gpu/command_buffer/service/service_utils.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "gpu/command_buffer/service/transfer_buffer_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -326,20 +325,16 @@
if (base_context_) {
context_ = scoped_refptr<gl::GLContext>(new gpu::GLContextVirtual(
share_group_.get(), base_context_->get(), decoder_->AsWeakPtr()));
- ASSERT_TRUE(context_->Initialize(
- surface_.get(),
- GenerateGLContextAttribs(attribs, context_group->gpu_preferences())));
+ ASSERT_TRUE(context_->Initialize(surface_.get(), attribs.gpu_preference));
} else {
if (real_gl_context) {
context_ = scoped_refptr<gl::GLContext>(new gpu::GLContextVirtual(
share_group_.get(), real_gl_context, decoder_->AsWeakPtr()));
- ASSERT_TRUE(context_->Initialize(
- surface_.get(),
- GenerateGLContextAttribs(attribs, context_group->gpu_preferences())));
+ ASSERT_TRUE(
+ context_->Initialize(surface_.get(), attribs.gpu_preference));
} else {
- context_ = gl::init::CreateGLContext(
- share_group_.get(), surface_.get(),
- GenerateGLContextAttribs(attribs, context_group->gpu_preferences()));
+ context_ = gl::init::CreateGLContext(share_group_.get(), surface_.get(),
+ attribs.gpu_preference);
}
}
ASSERT_TRUE(context_.get() != NULL) << "could not create GL context";
@@ -403,9 +398,9 @@
gfx::Size size(4, 4);
base_surface_ = new scoped_refptr<gl::GLSurface>(
gl::init::CreateOffscreenGLSurface(size));
+ gl::GpuPreference gpu_preference(gl::PreferDiscreteGpu);
base_context_ = new scoped_refptr<gl::GLContext>(gl::init::CreateGLContext(
- base_share_group_->get(), base_surface_->get(),
- gl::GLContextAttribs()));
+ base_share_group_->get(), base_surface_->get(), gpu_preference));
#endif
}
++use_count_;
« no previous file with comments | « gpu/command_buffer/service/service_utils.cc ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698