OLD | NEW |
---|---|
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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 3177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3188 offscreen_saved_frame_buffer_.reset(); | 3188 offscreen_saved_frame_buffer_.reset(); |
3189 offscreen_saved_color_texture_.reset(); | 3189 offscreen_saved_color_texture_.reset(); |
3190 offscreen_resolved_frame_buffer_.reset(); | 3190 offscreen_resolved_frame_buffer_.reset(); |
3191 offscreen_resolved_color_texture_.reset(); | 3191 offscreen_resolved_color_texture_.reset(); |
3192 | 3192 |
3193 if (group_) { | 3193 if (group_) { |
3194 group_->Destroy(this, have_context); | 3194 group_->Destroy(this, have_context); |
3195 group_ = NULL; | 3195 group_ = NULL; |
3196 } | 3196 } |
3197 | 3197 |
3198 // Keep the context current, since the surface destructor might clean up | |
3199 // resources. | |
3200 surface_ = NULL; | |
epenner
2013/05/28 23:36:56
This looks good but see have_context above. It loo
| |
3198 if (context_.get()) { | 3201 if (context_.get()) { |
3199 context_->ReleaseCurrent(NULL); | 3202 context_->ReleaseCurrent(NULL); |
3200 context_ = NULL; | 3203 context_ = NULL; |
3201 } | 3204 } |
3202 | 3205 |
3203 #if defined(OS_MACOSX) | 3206 #if defined(OS_MACOSX) |
3204 for (TextureToIOSurfaceMap::iterator it = texture_to_io_surface_map_.begin(); | 3207 for (TextureToIOSurfaceMap::iterator it = texture_to_io_surface_map_.begin(); |
3205 it != texture_to_io_surface_map_.end(); ++it) { | 3208 it != texture_to_io_surface_map_.end(); ++it) { |
3206 CFRelease(it->second); | 3209 CFRelease(it->second); |
3207 } | 3210 } |
(...skipping 7146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10354 return error::kNoError; | 10357 return error::kNoError; |
10355 } | 10358 } |
10356 | 10359 |
10357 // Include the auto-generated part of this file. We split this because it means | 10360 // Include the auto-generated part of this file. We split this because it means |
10358 // we can easily edit the non-auto generated parts right here in this file | 10361 // we can easily edit the non-auto generated parts right here in this file |
10359 // instead of having to edit some template or the code generator. | 10362 // instead of having to edit some template or the code generator. |
10360 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10363 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10361 | 10364 |
10362 } // namespace gles2 | 10365 } // namespace gles2 |
10363 } // namespace gpu | 10366 } // namespace gpu |
OLD | NEW |