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

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

Issue 455783002: GPU context creation code duplication cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fix even more build dependencies Created 6 years, 4 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | gpu/gpu.gyp » ('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" 5 #include "gpu/command_buffer/tests/gl_manager.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 mailbox_manager_ = 153 mailbox_manager_ =
154 mailbox_manager ? mailbox_manager : new gles2::MailboxManager; 154 mailbox_manager ? mailbox_manager : new gles2::MailboxManager;
155 share_group_ = 155 share_group_ =
156 share_group ? share_group : new gfx::GLShareGroup; 156 share_group ? share_group : new gfx::GLShareGroup;
157 157
158 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu); 158 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu);
159 std::vector<int32> attribs; 159 std::vector<int32> attribs;
160 gles2::ContextCreationAttribHelper attrib_helper; 160 gles2::ContextCreationAttribHelper attrib_helper;
161 attrib_helper.red_size_ = 8; 161 attrib_helper.red_size = 8;
162 attrib_helper.green_size_ = 8; 162 attrib_helper.green_size = 8;
163 attrib_helper.blue_size_ = 8; 163 attrib_helper.blue_size = 8;
164 attrib_helper.alpha_size_ = 8; 164 attrib_helper.alpha_size = 8;
165 attrib_helper.depth_size_ = 16; 165 attrib_helper.depth_size = 16;
166 attrib_helper.Serialize(&attribs); 166 attrib_helper.Serialize(&attribs);
167 167
168 if (!context_group) { 168 if (!context_group) {
169 context_group = 169 context_group =
170 new gles2::ContextGroup(mailbox_manager_.get(), 170 new gles2::ContextGroup(mailbox_manager_.get(),
171 NULL, 171 NULL,
172 new gpu::gles2::ShaderTranslatorCache, 172 new gpu::gles2::ShaderTranslatorCache,
173 NULL, 173 NULL,
174 options.bind_generates_resource); 174 options.bind_generates_resource);
175 } 175 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 void GLManager::Echo(const base::Closure& callback) { 385 void GLManager::Echo(const base::Closure& callback) {
386 NOTIMPLEMENTED(); 386 NOTIMPLEMENTED();
387 } 387 }
388 388
389 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { 389 uint32 GLManager::CreateStreamTexture(uint32 texture_id) {
390 NOTIMPLEMENTED(); 390 NOTIMPLEMENTED();
391 return 0; 391 return 0;
392 } 392 }
393 393
394 } // namespace gpu 394 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698