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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/test_helper.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/tests/gl_manager.h"
6
7 #include <vector>
8
9 #include "base/at_exit.h" 5 #include "base/at_exit.h"
10 #include "base/bind.h" 6 #include "base/bind.h"
11 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
12 #include "gpu/command_buffer/client/gles2_lib.h" 8 #include "gpu/command_buffer/client/gles2_lib.h"
13 #include "gpu/command_buffer/client/transfer_buffer.h" 9 #include "gpu/command_buffer/client/transfer_buffer.h"
14 #include "gpu/command_buffer/common/constants.h" 10 #include "gpu/command_buffer/common/constants.h"
15 #include "gpu/command_buffer/service/command_buffer_service.h" 11 #include "gpu/command_buffer/service/command_buffer_service.h"
16 #include "gpu/command_buffer/service/context_group.h" 12 #include "gpu/command_buffer/service/context_group.h"
17 #include "gpu/command_buffer/service/gpu_scheduler.h" 13 #include "gpu/command_buffer/service/gpu_scheduler.h"
18 #include "gpu/command_buffer/service/mailbox_manager.h" 14 #include "gpu/command_buffer/service/mailbox_manager.h"
15 #include "gpu/command_buffer/tests/gl_manager.h"
19 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
20 #include "ui/gl/gl_context.h" 17 #include "ui/gl/gl_context.h"
21 #include "ui/gl/gl_share_group.h" 18 #include "ui/gl/gl_share_group.h"
22 #include "ui/gl/gl_surface.h" 19 #include "ui/gl/gl_surface.h"
23 20
24 namespace gpu { 21 namespace gpu {
25 22
26 GLManager::GLManager() { 23 GLManager::GLManager() {
27 } 24 }
28 25
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 attribs.push_back(EGL_BLUE_SIZE); 88 attribs.push_back(EGL_BLUE_SIZE);
92 attribs.push_back(8); 89 attribs.push_back(8);
93 attribs.push_back(EGL_ALPHA_SIZE); 90 attribs.push_back(EGL_ALPHA_SIZE);
94 attribs.push_back(8); 91 attribs.push_back(8);
95 attribs.push_back(EGL_DEPTH_SIZE); 92 attribs.push_back(EGL_DEPTH_SIZE);
96 attribs.push_back(16); 93 attribs.push_back(16);
97 attribs.push_back(EGL_NONE); 94 attribs.push_back(EGL_NONE);
98 95
99 if (!context_group) { 96 if (!context_group) {
100 context_group = new gles2::ContextGroup( 97 context_group = new gles2::ContextGroup(
101 mailbox_manager_.get(), 98 mailbox_manager_.get(), kBindGeneratesResource);
102 kBindGeneratesResource,
103 NULL);
104 } 99 }
105 100
106 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); 101 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group));
107 102
108 command_buffer_.reset(new CommandBufferService( 103 command_buffer_.reset(new CommandBufferService(
109 decoder_->GetContextGroup()->transfer_buffer_manager())); 104 decoder_->GetContextGroup()->transfer_buffer_manager()));
110 ASSERT_TRUE(command_buffer_->Initialize()) 105 ASSERT_TRUE(command_buffer_->Initialize())
111 << "could not create command buffer service"; 106 << "could not create command buffer service";
112 107
113 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), 108 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(),
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); 184 ::gpu::CommandBuffer::State state = command_buffer_->GetState();
190 ASSERT_EQ(::gpu::error::kNoError, state.error); 185 ASSERT_EQ(::gpu::error::kNoError, state.error);
191 } 186 }
192 187
193 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { 188 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) {
194 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); 189 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id);
195 } 190 }
196 191
197 } // namespace gpu 192 } // namespace gpu
198 193
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/test_helper.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698