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

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

Issue 199443004: gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: checkmem: benchmark Created 6 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 unified diff | Download patch | Annotate | Revision Log
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>
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "gpu/command_buffer/service/gl_utils.h" 13 #include "gpu/command_buffer/service/gl_utils.h"
14 #include "gpu/command_buffer/service/query_manager.h" 14 #include "gpu/command_buffer/service/query_manager.h"
15 #include "gpu/command_buffer/service/texture_manager.h" 15 #include "gpu/command_buffer/service/texture_manager.h"
16 #include "gpu/command_buffer/service/vertex_attrib_manager.h" 16 #include "gpu/command_buffer/service/vertex_attrib_manager.h"
17 #include "gpu/command_buffer/service/vertex_array_manager.h" 17 #include "gpu/command_buffer/service/vertex_array_manager.h"
18 #include "gpu/gpu_export.h" 18 #include "gpu/gpu_export.h"
19 19
20 namespace gpu { 20 namespace gpu {
21 namespace gles2 { 21 namespace gles2 {
22 22
23 class Buffer; 23 class Buffer;
24 class ErrorState; 24 class ErrorState;
25 class ErrorStateClient;
25 class FeatureInfo; 26 class FeatureInfo;
26 class Framebuffer; 27 class Framebuffer;
27 class Program; 28 class Program;
28 class Renderbuffer; 29 class Renderbuffer;
29 30
30 // State associated with each texture unit. 31 // State associated with each texture unit.
31 struct GPU_EXPORT TextureUnit { 32 struct GPU_EXPORT TextureUnit {
32 TextureUnit(); 33 TextureUnit();
33 ~TextureUnit(); 34 ~TextureUnit();
34 35
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Vec4() { 87 Vec4() {
87 v[0] = 0.0f; 88 v[0] = 0.0f;
88 v[1] = 0.0f; 89 v[1] = 0.0f;
89 v[2] = 0.0f; 90 v[2] = 0.0f;
90 v[3] = 1.0f; 91 v[3] = 1.0f;
91 } 92 }
92 float v[4]; 93 float v[4];
93 }; 94 };
94 95
95 struct GPU_EXPORT ContextState { 96 struct GPU_EXPORT ContextState {
96 ContextState(FeatureInfo* feature_info, Logger* logger); 97 ContextState(FeatureInfo* feature_info,
98 ErrorStateClient* error_state_client,
99 Logger* logger);
97 ~ContextState(); 100 ~ContextState();
98 101
99 void Initialize(); 102 void Initialize();
100 103
101 void RestoreState(const ContextState* prev_state) const; 104 void RestoreState(const ContextState* prev_state) const;
102 void InitCapabilities() const; 105 void InitCapabilities() const;
103 void InitState() const; 106 void InitState() const;
104 107
105 void RestoreActiveTexture() const; 108 void RestoreActiveTexture() const;
106 void RestoreAllTextureUnitBindings(const ContextState* prev_state) const; 109 void RestoreAllTextureUnitBindings(const ContextState* prev_state) const;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 164
162 private: 165 private:
163 scoped_ptr<ErrorState> error_state_; 166 scoped_ptr<ErrorState> error_state_;
164 }; 167 };
165 168
166 } // namespace gles2 169 } // namespace gles2
167 } // namespace gpu 170 } // namespace gpu
168 171
169 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ 172 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
170 173
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698