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

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

Issue 1716813002: Use GpuPreferences to avoid directly accessing switches in gpu related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 9 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
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 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/containers/scoped_ptr_hash_map.h" 11 #include "base/containers/scoped_ptr_hash_map.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "gpu/command_buffer/client/gpu_control.h" 14 #include "gpu/command_buffer/client/gpu_control.h"
15 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 15 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
16 #include "gpu/command_buffer/service/feature_info.h" 16 #include "gpu/command_buffer/service/feature_info.h"
17 #include "gpu/command_buffer/service/gpu_preferences.h"
17 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
18 #include "ui/gfx/gpu_memory_buffer.h" 19 #include "ui/gfx/gpu_memory_buffer.h"
19 20
20 namespace base { 21 namespace base {
21 class CommandLine; 22 class CommandLine;
22 } 23 }
23 24
24 namespace gfx { 25 namespace gfx {
25 26
26 class GLContext; 27 class GLContext;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 private: 146 private:
146 void PumpCommands(); 147 void PumpCommands();
147 bool GetBufferChanged(int32_t transfer_buffer_id); 148 bool GetBufferChanged(int32_t transfer_buffer_id);
148 void SetupBaseContext(); 149 void SetupBaseContext();
149 void OnFenceSyncRelease(uint64_t release); 150 void OnFenceSyncRelease(uint64_t release);
150 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, 151 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
151 gpu::CommandBufferId command_buffer_id, 152 gpu::CommandBufferId command_buffer_id,
152 uint64_t release); 153 uint64_t release);
153 154
155 gpu::GpuPreferences gpu_preferences_;
156
154 SyncPointManager* sync_point_manager_; // Non-owning. 157 SyncPointManager* sync_point_manager_; // Non-owning.
155 158
156 scoped_refptr<SyncPointOrderData> sync_point_order_data_; 159 scoped_refptr<SyncPointOrderData> sync_point_order_data_;
157 scoped_ptr<SyncPointClient> sync_point_client_; 160 scoped_ptr<SyncPointClient> sync_point_client_;
158 scoped_refptr<gles2::MailboxManager> mailbox_manager_; 161 scoped_refptr<gles2::MailboxManager> mailbox_manager_;
159 scoped_refptr<gfx::GLShareGroup> share_group_; 162 scoped_refptr<gfx::GLShareGroup> share_group_;
160 scoped_ptr<CommandBufferService> command_buffer_; 163 scoped_ptr<CommandBufferService> command_buffer_;
161 scoped_ptr<gles2::GLES2Decoder> decoder_; 164 scoped_ptr<gles2::GLES2Decoder> decoder_;
162 scoped_ptr<GpuScheduler> gpu_scheduler_; 165 scoped_ptr<GpuScheduler> gpu_scheduler_;
163 scoped_refptr<gfx::GLSurface> surface_; 166 scoped_refptr<gfx::GLSurface> surface_;
(...skipping 11 matching lines...) Expand all
175 // Used on Android to virtualize GL for all contexts. 178 // Used on Android to virtualize GL for all contexts.
176 static int use_count_; 179 static int use_count_;
177 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; 180 static scoped_refptr<gfx::GLShareGroup>* base_share_group_;
178 static scoped_refptr<gfx::GLSurface>* base_surface_; 181 static scoped_refptr<gfx::GLSurface>* base_surface_;
179 static scoped_refptr<gfx::GLContext>* base_context_; 182 static scoped_refptr<gfx::GLContext>* base_context_;
180 }; 183 };
181 184
182 } // namespace gpu 185 } // namespace gpu
183 186
184 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 187 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_translator_unittest.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698