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

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

Issue 1922633002: Implement TransformFeedbackManager in GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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.h ('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 80687b7db51fdf7fccc389c3b18b3745788e63b3..3a44730c40b37e49128c4a1692aac8dc3052fc90 100644
--- a/gpu/command_buffer/service/context_state.h
+++ b/gpu/command_buffer/service/context_state.h
@@ -29,6 +29,7 @@ class Framebuffer;
class Logger;
class Program;
class Renderbuffer;
+class TransformFeedback;
// State associated with each texture unit.
struct GPU_EXPORT TextureUnit {
@@ -188,6 +189,7 @@ struct GPU_EXPORT ContextState {
void RestoreGlobalState(const ContextState* prev_state) const;
void RestoreProgramBindings() const;
void RestoreRenderbufferBindings();
+ void RestoreTransformFeedbackBindings(const ContextState* prev_state);
void RestoreTextureUnitBindings(
GLuint unit, const ContextState* prev_state) const;
@@ -273,6 +275,14 @@ struct GPU_EXPORT ContextState {
// Which samplers are bound to each texture unit;
std::vector<scoped_refptr<Sampler>> sampler_units;
+ // We create a transform feedback as the default one per ES3 enabled context
+ // instead of using GL's default one to make context switching easier.
+ // For other context, we will never change the default transform feedback's
+ // states, so we can just use the GL's default one.
+ scoped_refptr<TransformFeedback> default_transform_feedback;
+
+ scoped_refptr<TransformFeedback> bound_transform_feedback;
+
// The values for each attrib.
std::vector<Vec4> attrib_values;
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698