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

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

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/texture_manager.h ('k') | gpu/command_buffer_service.gypi » ('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 #include <GLES2/gl2extchromium.h> 9 #include <GLES2/gl2extchromium.h>
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/at_exit.h" 13 #include "base/at_exit.h"
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/memory/ref_counted_memory.h" 15 #include "base/memory/ref_counted_memory.h"
16 #include "gpu/command_buffer/client/gles2_implementation.h" 16 #include "gpu/command_buffer/client/gles2_implementation.h"
17 #include "gpu/command_buffer/client/gles2_lib.h" 17 #include "gpu/command_buffer/client/gles2_lib.h"
18 #include "gpu/command_buffer/client/transfer_buffer.h" 18 #include "gpu/command_buffer/client/transfer_buffer.h"
19 #include "gpu/command_buffer/common/constants.h" 19 #include "gpu/command_buffer/common/constants.h"
20 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 20 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
21 #include "gpu/command_buffer/service/command_buffer_service.h" 21 #include "gpu/command_buffer/service/command_buffer_service.h"
22 #include "gpu/command_buffer/service/context_group.h" 22 #include "gpu/command_buffer/service/context_group.h"
23 #include "gpu/command_buffer/service/gl_context_virtual.h" 23 #include "gpu/command_buffer/service/gl_context_virtual.h"
24 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 24 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
25 #include "gpu/command_buffer/service/gpu_scheduler.h" 25 #include "gpu/command_buffer/service/gpu_scheduler.h"
26 #include "gpu/command_buffer/service/image_manager.h" 26 #include "gpu/command_buffer/service/image_manager.h"
27 #include "gpu/command_buffer/service/mailbox_manager.h" 27 #include "gpu/command_buffer/service/mailbox_manager_impl.h"
28 #include "gpu/command_buffer/service/memory_tracking.h" 28 #include "gpu/command_buffer/service/memory_tracking.h"
29 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
30 #include "ui/gfx/gpu_memory_buffer.h" 30 #include "ui/gfx/gpu_memory_buffer.h"
31 #include "ui/gl/gl_context.h" 31 #include "ui/gl/gl_context.h"
32 #include "ui/gl/gl_image_ref_counted_memory.h" 32 #include "ui/gl/gl_image_ref_counted_memory.h"
33 #include "ui/gl/gl_share_group.h" 33 #include "ui/gl/gl_share_group.h"
34 #include "ui/gl/gl_surface.h" 34 #include "ui/gl/gl_surface.h"
35 35
36 namespace gpu { 36 namespace gpu {
37 namespace { 37 namespace {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 client_share_group = 167 client_share_group =
168 options.share_group_manager->gles2_implementation()->share_group(); 168 options.share_group_manager->gles2_implementation()->share_group();
169 } 169 }
170 170
171 gfx::GLContext* real_gl_context = NULL; 171 gfx::GLContext* real_gl_context = NULL;
172 if (options.virtual_manager) { 172 if (options.virtual_manager) {
173 real_gl_context = options.virtual_manager->context(); 173 real_gl_context = options.virtual_manager->context();
174 } 174 }
175 175
176 mailbox_manager_ = 176 mailbox_manager_ =
177 mailbox_manager ? mailbox_manager : new gles2::MailboxManager; 177 mailbox_manager ? mailbox_manager : new gles2::MailboxManagerImpl;
178 share_group_ = 178 share_group_ =
179 share_group ? share_group : new gfx::GLShareGroup; 179 share_group ? share_group : new gfx::GLShareGroup;
180 180
181 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu); 181 gfx::GpuPreference gpu_preference(gfx::PreferDiscreteGpu);
182 std::vector<int32> attribs; 182 std::vector<int32> attribs;
183 gles2::ContextCreationAttribHelper attrib_helper; 183 gles2::ContextCreationAttribHelper attrib_helper;
184 attrib_helper.red_size = 8; 184 attrib_helper.red_size = 8;
185 attrib_helper.green_size = 8; 185 attrib_helper.green_size = 8;
186 attrib_helper.blue_size = 8; 186 attrib_helper.blue_size = 8;
187 attrib_helper.alpha_size = 8; 187 attrib_helper.alpha_size = 8;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 void GLManager::SetSurfaceVisible(bool visible) { 403 void GLManager::SetSurfaceVisible(bool visible) {
404 NOTIMPLEMENTED(); 404 NOTIMPLEMENTED();
405 } 405 }
406 406
407 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { 407 uint32 GLManager::CreateStreamTexture(uint32 texture_id) {
408 NOTIMPLEMENTED(); 408 NOTIMPLEMENTED();
409 return 0; 409 return 0;
410 } 410 }
411 411
412 } // namespace gpu 412 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698