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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_validation.h

Issue 7304002: Correct reporting of compressed texture formats and shader binary formats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Contains various validation functions for the GLES2 service. 5 // Contains various validation functions for the GLES2 service.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_H_
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <vector> 11 #include <vector>
(...skipping 19 matching lines...) Expand all
31 if (!IsValid(value)) { 31 if (!IsValid(value)) {
32 valid_values_.push_back(value); 32 valid_values_.push_back(value);
33 } 33 }
34 } 34 }
35 35
36 bool IsValid(const T value) const { 36 bool IsValid(const T value) const {
37 return std::find(valid_values_.begin(), valid_values_.end(), value) != 37 return std::find(valid_values_.begin(), valid_values_.end(), value) !=
38 valid_values_.end(); 38 valid_values_.end();
39 } 39 }
40 40
41 const std::vector<T>& GetValues() const {
42 return valid_values_;
43 }
44
41 private: 45 private:
42 std::vector<T> valid_values_; 46 std::vector<T> valid_values_;
43 }; 47 };
44 48
45 struct Validators { 49 struct Validators {
46 Validators(); 50 Validators();
47 #include "gpu/command_buffer/service/gles2_cmd_validation_autogen.h" 51 #include "gpu/command_buffer/service/gles2_cmd_validation_autogen.h"
48 }; 52 };
49 53
50 } // namespace gles2 54 } // namespace gles2
51 } // namespace gpu 55 } // namespace gpu
52 56
53 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_H_ 57 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_H_
54 58
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_validation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698