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

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

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
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/error_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "gpu/command_buffer/service/context_state.h" 5 #include "gpu/command_buffer/service/context_state.h"
6 6
7 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 7 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
8 #include "gpu/command_buffer/service/buffer_manager.h" 8 #include "gpu/command_buffer/service/buffer_manager.h"
9 #include "gpu/command_buffer/service/error_state.h" 9 #include "gpu/command_buffer/service/error_state.h"
10 #include "gpu/command_buffer/service/framebuffer_manager.h" 10 #include "gpu/command_buffer/service/framebuffer_manager.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 } // anonymous namespace. 81 } // anonymous namespace.
82 82
83 TextureUnit::TextureUnit() 83 TextureUnit::TextureUnit()
84 : bind_target(GL_TEXTURE_2D) { 84 : bind_target(GL_TEXTURE_2D) {
85 } 85 }
86 86
87 TextureUnit::~TextureUnit() { 87 TextureUnit::~TextureUnit() {
88 } 88 }
89 89
90 ContextState::ContextState(FeatureInfo* feature_info, Logger* logger) 90 ContextState::ContextState(FeatureInfo* feature_info,
91 ErrorStateClient* error_state_client,
92 Logger* logger)
91 : active_texture_unit(0), 93 : active_texture_unit(0),
92 pack_reverse_row_order(false), 94 pack_reverse_row_order(false),
93 fbo_binding_for_scissor_workaround_dirty_(false), 95 fbo_binding_for_scissor_workaround_dirty_(false),
94 feature_info_(feature_info), 96 feature_info_(feature_info),
95 error_state_(ErrorState::Create(logger)) { 97 error_state_(ErrorState::Create(error_state_client, logger)) {
96 Initialize(); 98 Initialize();
97 } 99 }
98 100
99 ContextState::~ContextState() { 101 ContextState::~ContextState() {
100 } 102 }
101 103
102 void ContextState::RestoreTextureUnitBindings( 104 void ContextState::RestoreTextureUnitBindings(
103 GLuint unit, const ContextState* prev_state) const { 105 GLuint unit, const ContextState* prev_state) const {
104 DCHECK_LT(unit, texture_units.size()); 106 DCHECK_LT(unit, texture_units.size());
105 const TextureUnit& texture_unit = texture_units[unit]; 107 const TextureUnit& texture_unit = texture_units[unit];
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 244
243 // Include the auto-generated part of this file. We split this because it means 245 // Include the auto-generated part of this file. We split this because it means
244 // we can easily edit the non-auto generated parts right here in this file 246 // we can easily edit the non-auto generated parts right here in this file
245 // instead of having to edit some template or the code generator. 247 // instead of having to edit some template or the code generator.
246 #include "gpu/command_buffer/service/context_state_impl_autogen.h" 248 #include "gpu/command_buffer/service/context_state_impl_autogen.h"
247 249
248 } // namespace gles2 250 } // namespace gles2
249 } // namespace gpu 251 } // namespace gpu
250 252
251 253
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/error_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698