| 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 c4b84a2c9df0a763ac853afab08ecbf63c2824d2..2c4816465c6ec519823af5912b2323f137135b7a 100644
|
| --- a/gpu/command_buffer/tests/gl_manager.cc
|
| +++ b/gpu/command_buffer/tests/gl_manager.cc
|
| @@ -12,10 +12,12 @@
|
| #include "gpu/command_buffer/client/gles2_lib.h"
|
| #include "gpu/command_buffer/client/transfer_buffer.h"
|
| #include "gpu/command_buffer/common/constants.h"
|
| +#include "gpu/command_buffer/common/gles2_cmd_utils.h"
|
| #include "gpu/command_buffer/service/command_buffer_service.h"
|
| #include "gpu/command_buffer/service/context_group.h"
|
| #include "gpu/command_buffer/service/gl_context_virtual.h"
|
| #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
|
| +#include "gpu/command_buffer/service/gpu_control_service.h"
|
| #include "gpu/command_buffer/service/gpu_scheduler.h"
|
| #include "gpu/command_buffer/service/image_manager.h"
|
| #include "gpu/command_buffer/service/mailbox_manager.h"
|
| @@ -38,8 +40,7 @@ GLManager::Options::Options()
|
| virtual_manager(NULL),
|
| bind_generates_resource(false),
|
| context_lost_allowed(false),
|
| - image_manager(NULL),
|
| - image_factory(NULL) {
|
| + image_manager(NULL) {
|
| }
|
|
|
| GLManager::GLManager()
|
| @@ -100,14 +101,6 @@ void GLManager::Initialize(const GLManager::Options& options) {
|
| real_gl_context = options.virtual_manager->context();
|
| }
|
|
|
| - // From <EGL/egl.h>.
|
| - const int32 EGL_ALPHA_SIZE = 0x3021;
|
| - const int32 EGL_BLUE_SIZE = 0x3022;
|
| - const int32 EGL_GREEN_SIZE = 0x3023;
|
| - const int32 EGL_RED_SIZE = 0x3024;
|
| - const int32 EGL_DEPTH_SIZE = 0x3025;
|
| - const int32 EGL_NONE = 0x3038;
|
| -
|
| mailbox_manager_ =
|
| mailbox_manager ? mailbox_manager : new gles2::MailboxManager;
|
| share_group_ =
|
| @@ -116,17 +109,13 @@ void GLManager::Initialize(const GLManager::Options& options) {
|
| gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu);
|
| const char* allowed_extensions = "*";
|
| std::vector<int32> attribs;
|
| - attribs.push_back(EGL_RED_SIZE);
|
| - attribs.push_back(8);
|
| - attribs.push_back(EGL_GREEN_SIZE);
|
| - attribs.push_back(8);
|
| - attribs.push_back(EGL_BLUE_SIZE);
|
| - attribs.push_back(8);
|
| - attribs.push_back(EGL_ALPHA_SIZE);
|
| - attribs.push_back(8);
|
| - attribs.push_back(EGL_DEPTH_SIZE);
|
| - attribs.push_back(16);
|
| - attribs.push_back(EGL_NONE);
|
| + gles2::ContextCreationAttribHelper attrib_helper;
|
| + attrib_helper.red_size_ = 8;
|
| + attrib_helper.green_size_ = 8;
|
| + attrib_helper.blue_size_ = 8;
|
| + attrib_helper.alpha_size_ = 8;
|
| + attrib_helper.depth_size_ = 16;
|
| + attrib_helper.Serialize(&attribs);
|
|
|
| if (!context_group) {
|
| context_group = new gles2::ContextGroup(mailbox_manager_.get(),
|
| @@ -143,6 +132,10 @@ void GLManager::Initialize(const GLManager::Options& options) {
|
| ASSERT_TRUE(command_buffer_->Initialize())
|
| << "could not create command buffer service";
|
|
|
| + gpu_control_.reset(
|
| + new GpuControlService(decoder_->GetContextGroup()->image_manager(),
|
| + options.gpu_memory_buffer_factory));
|
| +
|
| gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(),
|
| decoder_.get(),
|
| decoder_.get()));
|
| @@ -200,7 +193,7 @@ void GLManager::Initialize(const GLManager::Options& options) {
|
| client_share_group,
|
| transfer_buffer_.get(),
|
| options.bind_generates_resource,
|
| - options.image_factory));
|
| + gpu_control_.get()));
|
|
|
| ASSERT_TRUE(gles2_implementation_->Initialize(
|
| kStartTransferBufferSize,
|
|
|