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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.h

Issue 2480373002: Refactor context creation parameters into a struct. (Closed)
Patch Set: address piman's comments Created 4 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
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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
10 10
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 DISALLOW_COPY_AND_ASSIGN(GLSLArrayName); 295 DISALLOW_COPY_AND_ASSIGN(GLSLArrayName);
296 }; 296 };
297 297
298 enum ContextType { 298 enum ContextType {
299 CONTEXT_TYPE_WEBGL1, 299 CONTEXT_TYPE_WEBGL1,
300 CONTEXT_TYPE_WEBGL2, 300 CONTEXT_TYPE_WEBGL2,
301 CONTEXT_TYPE_OPENGLES2, 301 CONTEXT_TYPE_OPENGLES2,
302 CONTEXT_TYPE_OPENGLES3, 302 CONTEXT_TYPE_OPENGLES3,
303 CONTEXT_TYPE_LAST = CONTEXT_TYPE_OPENGLES3 303 CONTEXT_TYPE_LAST = CONTEXT_TYPE_OPENGLES3
304 }; 304 };
305 GLES2_UTILS_EXPORT bool IsWebGLContextType(ContextType context_type);
305 306
306 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper { 307 struct GLES2_UTILS_EXPORT ContextCreationAttribHelper {
307 ContextCreationAttribHelper(); 308 ContextCreationAttribHelper();
308 ContextCreationAttribHelper(const ContextCreationAttribHelper& other); 309 ContextCreationAttribHelper(const ContextCreationAttribHelper& other);
309 310
310 bool Parse(const std::vector<int32_t>& attribs); 311 bool Parse(const std::vector<int32_t>& attribs);
311 312
312 gfx::Size offscreen_framebuffer_size; 313 gfx::Size offscreen_framebuffer_size;
313 gl::GpuPreference gpu_preference; 314 gl::GpuPreference gpu_preference;
314 // -1 if invalid or unspecified. 315 // -1 if invalid or unspecified.
(...skipping 12 matching lines...) Expand all
327 bool should_use_native_gmb_for_backbuffer; 328 bool should_use_native_gmb_for_backbuffer;
328 329
329 ContextType context_type; 330 ContextType context_type;
330 }; 331 };
331 332
332 } // namespace gles2 333 } // namespace gles2
333 } // namespace gpu 334 } // namespace gpu
334 335
335 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 336 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
336 337
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698