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/service/gles2_cmd_decoder_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + | 245 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + |
246 shared_memory_offset_; | 246 shared_memory_offset_; |
247 shared_memory_id_ = kSharedMemoryId; | 247 shared_memory_id_ = kSharedMemoryId; |
248 shared_memory_base_ = buffer.ptr; | 248 shared_memory_base_ = buffer.ptr; |
249 | 249 |
250 surface_ = new gfx::GLSurfaceStub; | 250 surface_ = new gfx::GLSurfaceStub; |
251 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 251 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
252 | 252 |
253 context_ = new gfx::GLContextStub; | 253 context_ = new gfx::GLContextStub; |
254 | 254 |
255 context_->MakeCurrent(surface_); | 255 context_->MakeCurrent(surface_.get()); |
256 | 256 |
257 int32 attributes[] = { | 257 int32 attributes[] = { |
258 EGL_ALPHA_SIZE, request_alpha ? 8 : 0, | 258 EGL_ALPHA_SIZE, request_alpha ? 8 : 0, |
259 EGL_DEPTH_SIZE, request_depth ? 24 : 0, | 259 EGL_DEPTH_SIZE, request_depth ? 24 : 0, |
260 EGL_STENCIL_SIZE, request_stencil ? 8 : 0, | 260 EGL_STENCIL_SIZE, request_stencil ? 8 : 0, |
261 }; | 261 }; |
262 std::vector<int32> attribs(attributes, attributes + arraysize(attributes)); | 262 std::vector<int32> attribs(attributes, attributes + arraysize(attributes)); |
263 | 263 |
264 decoder_.reset(GLES2Decoder::Create(group_.get())); | 264 decoder_.reset(GLES2Decoder::Create(group_.get())); |
265 decoder_->GetLogger()->set_log_synthesized_gl_errors(false); | 265 decoder_->GetLogger()->set_log_synthesized_gl_errors(false); |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 SetupDefaultProgram(); | 1387 SetupDefaultProgram(); |
1388 } | 1388 } |
1389 | 1389 |
1390 // Include the auto-generated part of this file. We split this because it means | 1390 // Include the auto-generated part of this file. We split this because it means |
1391 // we can easily edit the non-auto generated parts right here in this file | 1391 // we can easily edit the non-auto generated parts right here in this file |
1392 // instead of having to edit some template or the code generator. | 1392 // instead of having to edit some template or the code generator. |
1393 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1393 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1394 | 1394 |
1395 } // namespace gles2 | 1395 } // namespace gles2 |
1396 } // namespace gpu | 1396 } // namespace gpu |
OLD | NEW |