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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.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.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('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/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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698