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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 engine_.reset(new StrictMock<MockCommandBufferEngine>()); | 347 engine_.reset(new StrictMock<MockCommandBufferEngine>()); |
348 scoped_refptr<gpu::Buffer> buffer = | 348 scoped_refptr<gpu::Buffer> buffer = |
349 engine_->GetSharedMemoryBuffer(kSharedMemoryId); | 349 engine_->GetSharedMemoryBuffer(kSharedMemoryId); |
350 shared_memory_offset_ = kSharedMemoryOffset; | 350 shared_memory_offset_ = kSharedMemoryOffset; |
351 shared_memory_address_ = | 351 shared_memory_address_ = |
352 reinterpret_cast<int8*>(buffer->memory()) + shared_memory_offset_; | 352 reinterpret_cast<int8*>(buffer->memory()) + shared_memory_offset_; |
353 shared_memory_id_ = kSharedMemoryId; | 353 shared_memory_id_ = kSharedMemoryId; |
354 shared_memory_base_ = buffer->memory(); | 354 shared_memory_base_ = buffer->memory(); |
355 | 355 |
356 static const int32 kLoseContextWhenOutOfMemory = 0x10003; | 356 static const int32 kLoseContextWhenOutOfMemory = 0x10002; |
357 | 357 |
358 int32 attributes[] = { | 358 int32 attributes[] = { |
359 EGL_ALPHA_SIZE, | 359 EGL_ALPHA_SIZE, |
360 normalized_init.request_alpha ? 8 : 0, | 360 normalized_init.request_alpha ? 8 : 0, |
361 EGL_DEPTH_SIZE, | 361 EGL_DEPTH_SIZE, |
362 normalized_init.request_depth ? 24 : 0, | 362 normalized_init.request_depth ? 24 : 0, |
363 EGL_STENCIL_SIZE, | 363 EGL_STENCIL_SIZE, |
364 normalized_init.request_stencil ? 8 : 0, | 364 normalized_init.request_stencil ? 8 : 0, |
365 kLoseContextWhenOutOfMemory, | 365 kLoseContextWhenOutOfMemory, |
366 normalized_init.lose_context_when_out_of_memory ? 1 : 0, }; | 366 normalized_init.lose_context_when_out_of_memory ? 1 : 0, }; |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 SetupDefaultProgram(); | 1661 SetupDefaultProgram(); |
1662 } | 1662 } |
1663 | 1663 |
1664 // Include the auto-generated part of this file. We split this because it means | 1664 // Include the auto-generated part of this file. We split this because it means |
1665 // we can easily edit the non-auto generated parts right here in this file | 1665 // we can easily edit the non-auto generated parts right here in this file |
1666 // instead of having to edit some template or the code generator. | 1666 // instead of having to edit some template or the code generator. |
1667 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1667 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1668 | 1668 |
1669 } // namespace gles2 | 1669 } // namespace gles2 |
1670 } // namespace gpu | 1670 } // namespace gpu |
OLD | NEW |