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

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

Issue 455783002: GPU context creation code duplication cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: 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
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 static std::string GetQualifiedEnumString( 189 static std::string GetQualifiedEnumString(
190 const EnumToString* table, size_t count, uint32_t value); 190 const EnumToString* table, size_t count, uint32_t value);
191 191
192 static const EnumToString* const enum_to_string_table_; 192 static const EnumToString* const enum_to_string_table_;
193 static const size_t enum_to_string_table_len_; 193 static const size_t enum_to_string_table_len_;
194 194
195 int num_compressed_texture_formats_; 195 int num_compressed_texture_formats_;
196 int num_shader_binary_formats_; 196 int num_shader_binary_formats_;
197 }; 197 };
198 198
199 class GLES2_UTILS_EXPORT ContextCreationAttribHelper { 199 class GLES2_UTILS_EXPORT ContextCreationAttribHelper {
Zhenyao Mo 2014/08/09 00:42:25 Since you are cleaning things up in this: this sho
200 public: 200 public:
201 ContextCreationAttribHelper(); 201 ContextCreationAttribHelper();
202 202
203 void Serialize(std::vector<int32_t>* attribs); 203 void Serialize(std::vector<int32_t>* attribs) const;
204 bool Parse(const std::vector<int32_t>& attribs); 204 bool Parse(const std::vector<int32_t>& attribs);
205 205
206 // -1 if invalid or unspecified. 206 // -1 if invalid or unspecified.
207 int32_t alpha_size_; 207 int32_t alpha_size_;
208 int32_t blue_size_; 208 int32_t blue_size_;
209 int32_t green_size_; 209 int32_t green_size_;
210 int32_t red_size_; 210 int32_t red_size_;
211 int32_t depth_size_; 211 int32_t depth_size_;
212 int32_t stencil_size_; 212 int32_t stencil_size_;
213 int32_t samples_; 213 int32_t samples_;
214 int32_t sample_buffers_; 214 int32_t sample_buffers_;
215 bool buffer_preserved_; 215 bool buffer_preserved_;
216 bool share_resources_;
217 bool bind_generates_resource_; 216 bool bind_generates_resource_;
218 bool fail_if_major_perf_caveat_; 217 bool fail_if_major_perf_caveat_;
219 bool lose_context_when_out_of_memory_; 218 bool lose_context_when_out_of_memory_;
220 }; 219 };
221 220
222 } // namespace gles2 221 } // namespace gles2
223 } // namespace gpu 222 } // namespace gpu
224 223
225 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 224 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
226 225
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698