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

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

Issue 301793003: During image destroy, delete textures only if we have a GL context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased to ToT Created 6 years, 5 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
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/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 3475 matching lines...) Expand 10 before | Expand all | Expand 10 after
3486 if (query_manager_.get()) { 3486 if (query_manager_.get()) {
3487 query_manager_->Destroy(have_context); 3487 query_manager_->Destroy(have_context);
3488 query_manager_.reset(); 3488 query_manager_.reset();
3489 } 3489 }
3490 3490
3491 if (vertex_array_manager_ .get()) { 3491 if (vertex_array_manager_ .get()) {
3492 vertex_array_manager_->Destroy(have_context); 3492 vertex_array_manager_->Destroy(have_context);
3493 vertex_array_manager_.reset(); 3493 vertex_array_manager_.reset();
3494 } 3494 }
3495 3495
3496 if (image_manager()) {
reveman 2014/07/21 15:12:24 nit: image_manager_.get() for consistency
sohanjg 2014/07/21 15:39:51 Done.
3497 image_manager()->Destroy(have_context);
reveman 2014/07/21 15:12:24 nit: image_manager_->Destroy() for consistency
sohanjg 2014/07/21 15:39:51 Done.
3498 image_manager_.reset();
3499 }
3500
3496 offscreen_target_frame_buffer_.reset(); 3501 offscreen_target_frame_buffer_.reset();
3497 offscreen_target_color_texture_.reset(); 3502 offscreen_target_color_texture_.reset();
3498 offscreen_target_color_render_buffer_.reset(); 3503 offscreen_target_color_render_buffer_.reset();
3499 offscreen_target_depth_render_buffer_.reset(); 3504 offscreen_target_depth_render_buffer_.reset();
3500 offscreen_target_stencil_render_buffer_.reset(); 3505 offscreen_target_stencil_render_buffer_.reset();
3501 offscreen_saved_frame_buffer_.reset(); 3506 offscreen_saved_frame_buffer_.reset();
3502 offscreen_saved_color_texture_.reset(); 3507 offscreen_saved_color_texture_.reset();
3503 offscreen_resolved_frame_buffer_.reset(); 3508 offscreen_resolved_frame_buffer_.reset();
3504 offscreen_resolved_color_texture_.reset(); 3509 offscreen_resolved_color_texture_.reset();
3505 3510
(...skipping 7411 matching lines...) Expand 10 before | Expand all | Expand 10 after
10917 } 10922 }
10918 } 10923 }
10919 10924
10920 // Include the auto-generated part of this file. We split this because it means 10925 // Include the auto-generated part of this file. We split this because it means
10921 // we can easily edit the non-auto generated parts right here in this file 10926 // we can easily edit the non-auto generated parts right here in this file
10922 // instead of having to edit some template or the code generator. 10927 // instead of having to edit some template or the code generator.
10923 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 10928 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
10924 10929
10925 } // namespace gles2 10930 } // namespace gles2
10926 } // namespace gpu 10931 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698