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

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

Issue 11363191: Cache more GL state both service and client side. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 contains the ContextState class. 5 // This file contains the ContextState class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 struct GPU_EXPORT ContextState { 81 struct GPU_EXPORT ContextState {
82 ContextState(); 82 ContextState();
83 ~ContextState(); 83 ~ContextState();
84 84
85 void Initialize(); 85 void Initialize();
86 86
87 void RestoreState() const; 87 void RestoreState() const;
88 void InitCapabilities() const; 88 void InitCapabilities() const;
89 void InitState() const; 89 void InitState() const;
90 90
91 // Helper for getting cached state.
92 bool GetStateAsGLint(
93 GLenum pname, GLint* params, GLsizei* num_written) const;
94 bool GetStateAsGLfloat(
95 GLenum pname, GLfloat* params, GLsizei* num_written) const;
96 bool GetEnabled(GLenum cap) const;
97
91 #include "gpu/command_buffer/service/context_state_autogen.h" 98 #include "gpu/command_buffer/service/context_state_autogen.h"
92 99
93 EnableFlags enable_flags; 100 EnableFlags enable_flags;
94 101
95 // pack alignment as last set by glPixelStorei 102 // pack alignment as last set by glPixelStorei
96 GLint pack_alignment; 103 GLint pack_alignment;
97 104
98 // unpack alignment as last set by glPixelStorei 105 // unpack alignment as last set by glPixelStorei
99 GLint unpack_alignment; 106 GLint unpack_alignment;
100 107
(...skipping 28 matching lines...) Expand all
129 GLenum hint_fragment_shader_derivative; 136 GLenum hint_fragment_shader_derivative;
130 137
131 bool pack_reverse_row_order; 138 bool pack_reverse_row_order;
132 }; 139 };
133 140
134 } // namespace gles2 141 } // namespace gles2
135 } // namespace gpu 142 } // namespace gpu
136 143
137 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ 144 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
138 145
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698