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

Side by Side Diff: gpu/ipc/service/gpu_channel_test_common.cc

Issue 2814843002: gpu: GPU service scheduler. (Closed)
Patch Set: fix test dcheck failures Created 3 years, 7 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/ipc/service/gpu_channel_manager.cc ('k') | gpu/ipc/service/gpu_channel_unittest.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/ipc/service/gpu_channel_test_common.h" 5 #include "gpu/ipc/service/gpu_channel_test_common.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/test/test_simple_task_runner.h" 9 #include "base/test/test_simple_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 GpuChannelTestCommon::GpuChannelTestCommon() 73 GpuChannelTestCommon::GpuChannelTestCommon()
74 : task_runner_(new base::TestSimpleTaskRunner), 74 : task_runner_(new base::TestSimpleTaskRunner),
75 io_task_runner_(new base::TestSimpleTaskRunner), 75 io_task_runner_(new base::TestSimpleTaskRunner),
76 sync_point_manager_(new SyncPointManager()), 76 sync_point_manager_(new SyncPointManager()),
77 channel_manager_delegate_(new TestGpuChannelManagerDelegate()), 77 channel_manager_delegate_(new TestGpuChannelManagerDelegate()),
78 channel_manager_( 78 channel_manager_(
79 new GpuChannelManager(GpuPreferences(), 79 new GpuChannelManager(GpuPreferences(),
80 GpuDriverBugWorkarounds(), 80 GpuDriverBugWorkarounds(),
81 channel_manager_delegate_.get(), 81 channel_manager_delegate_.get(),
82 nullptr /* watchdog */, 82 nullptr, /* watchdog */
83 task_runner_.get(), 83 task_runner_.get(),
84 io_task_runner_.get(), 84 io_task_runner_.get(),
85 nullptr, /* scheduler */
85 sync_point_manager_.get(), 86 sync_point_manager_.get(),
86 nullptr /* gpu_memory_buffer_factory */, 87 nullptr, /* gpu_memory_buffer_factory */
87 GpuFeatureInfo(), 88 GpuFeatureInfo(),
88 GpuProcessActivityFlags())) { 89 GpuProcessActivityFlags())) {
89 // We need GL bindings to actually initialize command buffers. 90 // We need GL bindings to actually initialize command buffers.
90 gl::GLSurfaceTestSupport::InitializeOneOffWithStubBindings(); 91 gl::GLSurfaceTestSupport::InitializeOneOffWithStubBindings();
91 } 92 }
92 93
93 GpuChannelTestCommon::~GpuChannelTestCommon() { 94 GpuChannelTestCommon::~GpuChannelTestCommon() {
94 // Command buffers can post tasks and run GL in destruction so do this first. 95 // Command buffers can post tasks and run GL in destruction so do this first.
95 channel_manager_ = nullptr; 96 channel_manager_ = nullptr;
96 97
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 delete msg; 154 delete msg;
154 } 155 }
155 156
156 base::SharedMemoryHandle GpuChannelTestCommon::GetSharedHandle() { 157 base::SharedMemoryHandle GpuChannelTestCommon::GetSharedHandle() {
157 base::SharedMemory shared_memory; 158 base::SharedMemory shared_memory;
158 shared_memory.CreateAnonymous(10); 159 shared_memory.CreateAnonymous(10);
159 return shared_memory.handle().Duplicate(); 160 return shared_memory.handle().Duplicate();
160 } 161 }
161 162
162 } // namespace gpu 163 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.cc ('k') | gpu/ipc/service/gpu_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698