OLD | NEW |
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 } // namespace | 80 } // namespace |
81 | 81 |
82 int GLManager::use_count_; | 82 int GLManager::use_count_; |
83 scoped_refptr<gfx::GLShareGroup>* GLManager::base_share_group_; | 83 scoped_refptr<gfx::GLShareGroup>* GLManager::base_share_group_; |
84 scoped_refptr<gfx::GLSurface>* GLManager::base_surface_; | 84 scoped_refptr<gfx::GLSurface>* GLManager::base_surface_; |
85 scoped_refptr<gfx::GLContext>* GLManager::base_context_; | 85 scoped_refptr<gfx::GLContext>* GLManager::base_context_; |
86 | 86 |
87 GLManager::Options::Options() | 87 GLManager::Options::Options() |
88 : size(4, 4), | 88 : size(4, 4), |
| 89 stencil_size(-1), |
89 share_group_manager(NULL), | 90 share_group_manager(NULL), |
90 share_mailbox_manager(NULL), | 91 share_mailbox_manager(NULL), |
91 virtual_manager(NULL), | 92 virtual_manager(NULL), |
92 bind_generates_resource(false), | 93 bind_generates_resource(false), |
93 lose_context_when_out_of_memory(false), | 94 lose_context_when_out_of_memory(false), |
94 context_lost_allowed(false) { | 95 context_lost_allowed(false) { |
95 } | 96 } |
96 | 97 |
97 GLManager::GLManager() : context_lost_allowed_(false) { | 98 GLManager::GLManager() : context_lost_allowed_(false) { |
98 SetupBaseContext(); | 99 SetupBaseContext(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 share_group ? share_group : new gfx::GLShareGroup; | 158 share_group ? share_group : new gfx::GLShareGroup; |
158 | 159 |
159 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu); | 160 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu); |
160 std::vector<int32> attribs; | 161 std::vector<int32> attribs; |
161 gles2::ContextCreationAttribHelper attrib_helper; | 162 gles2::ContextCreationAttribHelper attrib_helper; |
162 attrib_helper.red_size = 8; | 163 attrib_helper.red_size = 8; |
163 attrib_helper.green_size = 8; | 164 attrib_helper.green_size = 8; |
164 attrib_helper.blue_size = 8; | 165 attrib_helper.blue_size = 8; |
165 attrib_helper.alpha_size = 8; | 166 attrib_helper.alpha_size = 8; |
166 attrib_helper.depth_size = 16; | 167 attrib_helper.depth_size = 16; |
| 168 attrib_helper.stencil_size = options.stencil_size; |
167 attrib_helper.Serialize(&attribs); | 169 attrib_helper.Serialize(&attribs); |
168 | 170 |
169 if (!context_group) { | 171 if (!context_group) { |
170 context_group = | 172 context_group = |
171 new gles2::ContextGroup(mailbox_manager_.get(), | 173 new gles2::ContextGroup(mailbox_manager_.get(), |
172 NULL, | 174 NULL, |
173 new gpu::gles2::ShaderTranslatorCache, | 175 new gpu::gles2::ShaderTranslatorCache, |
174 NULL, | 176 NULL, |
175 options.bind_generates_resource); | 177 options.bind_generates_resource); |
176 } | 178 } |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 void GLManager::Echo(const base::Closure& callback) { | 388 void GLManager::Echo(const base::Closure& callback) { |
387 NOTIMPLEMENTED(); | 389 NOTIMPLEMENTED(); |
388 } | 390 } |
389 | 391 |
390 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 392 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
391 NOTIMPLEMENTED(); | 393 NOTIMPLEMENTED(); |
392 return 0; | 394 return 0; |
393 } | 395 } |
394 | 396 |
395 } // namespace gpu | 397 } // namespace gpu |
OLD | NEW |