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

Unified Diff: gpu/command_buffer/service/gles2_cmd_validation.h

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_validation.h
diff --git a/gpu/command_buffer/service/gles2_cmd_validation.h b/gpu/command_buffer/service/gles2_cmd_validation.h
index 8ca98613d725b7882b4084b7bd1aeb9113c15c2d..f4059edb1b4ca7a9315a4fae98add1dd64228aaf 100644
--- a/gpu/command_buffer/service/gles2_cmd_validation.h
+++ b/gpu/command_buffer/service/gles2_cmd_validation.h
@@ -37,6 +37,17 @@ class ValueValidator {
}
}
+ void RemoveValues(const T* invalid_values, int num_values) {
+ for (int ii = 0; ii < num_values; ++ii) {
+ auto iter = std::find(
+ valid_values_.begin(), valid_values_.end(), invalid_values[ii]);
+ if (iter != valid_values_.end()) {
+ valid_values_.erase(iter);
+ DCHECK(!IsValid(invalid_values[ii]));
+ }
+ }
+ }
+
bool IsValid(const T value) const {
return std::find(valid_values_.begin(), valid_values_.end(), value) !=
valid_values_.end();
@@ -53,7 +64,7 @@ class ValueValidator {
struct Validators {
Validators();
- void AddES3Values();
+ void UpdateValuesES3();
#include "gpu/command_buffer/service/gles2_cmd_validation_autogen.h"
};

Powered by Google App Engine
This is Rietveld 408576698