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

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

Issue 2142353002: Validate fbo color image format and fragment shader output variable type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/context_group.cc ('k') | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_state.h
diff --git a/gpu/command_buffer/service/context_state.h b/gpu/command_buffer/service/context_state.h
index 647870436a8de4d2cc34b3c8b4066eb18a3fddb7..d026df9a06fd38c22f76e0d508d994063614921c 100644
--- a/gpu/command_buffer/service/context_state.h
+++ b/gpu/command_buffer/service/context_state.h
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "gpu/command_buffer/service/gl_utils.h"
#include "gpu/command_buffer/service/sampler_manager.h"
+#include "gpu/command_buffer/service/shader_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "gpu/command_buffer/service/vertex_array_manager.h"
#include "gpu/command_buffer/service/vertex_attrib_manager.h"
@@ -107,18 +108,12 @@ struct GPU_EXPORT TextureUnit {
class GPU_EXPORT Vec4 {
public:
- enum DataType {
- kFloat,
- kInt,
- kUInt,
- };
-
Vec4() {
v_[0].float_value = 0.0f;
v_[1].float_value = 0.0f;
v_[2].float_value = 0.0f;
v_[3].float_value = 1.0f;
- type_ = kFloat;
+ type_ = SHADER_VARIABLE_FLOAT;
}
template <typename T>
@@ -127,7 +122,7 @@ class GPU_EXPORT Vec4 {
template <typename T>
void SetValues(const T* values);
- DataType type() const {
+ ShaderVariableBaseType type() const {
return type_;
}
@@ -141,7 +136,7 @@ class GPU_EXPORT Vec4 {
};
ValueUnion v_[4];
- DataType type_;
+ ShaderVariableBaseType type_;
};
template <>
« no previous file with comments | « gpu/command_buffer/service/context_group.cc ('k') | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698