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

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

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: One more Destroy() call on Mac. Created 4 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc » ('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/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2753 return true; 2753 return true;
2754 } 2754 }
2755 2755
2756 void BackTexture::DestroyNativeGpuMemoryBuffer(bool have_context) { 2756 void BackTexture::DestroyNativeGpuMemoryBuffer(bool have_context) {
2757 if (image_) { 2757 if (image_) {
2758 ScopedGLErrorSuppressor suppressor( 2758 ScopedGLErrorSuppressor suppressor(
2759 "BackTexture::DestroyNativeGpuMemoryBuffer", 2759 "BackTexture::DestroyNativeGpuMemoryBuffer",
2760 decoder_->state_.GetErrorState()); 2760 decoder_->state_.GetErrorState());
2761 2761
2762 image_->ReleaseTexImage(Target()); 2762 image_->ReleaseTexImage(Target());
2763 image_->Destroy(have_context);
2764 2763
2765 decoder_->texture_manager()->SetLevelImage(texture_ref_.get(), Target(), 0, 2764 decoder_->texture_manager()->SetLevelImage(texture_ref_.get(), Target(), 0,
2766 nullptr, Texture::UNBOUND); 2765 nullptr, Texture::UNBOUND);
2767 image_ = nullptr; 2766 image_ = nullptr;
2768 } 2767 }
2769 } 2768 }
2770 2769
2771 BackRenderbuffer::BackRenderbuffer(GLES2DecoderImpl* decoder) 2770 BackRenderbuffer::BackRenderbuffer(GLES2DecoderImpl* decoder)
2772 : decoder_(decoder), 2771 : decoder_(decoder),
2773 memory_tracker_(decoder->memory_tracker()), 2772 memory_tracker_(decoder->memory_tracker()),
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
4739 } 4738 }
4740 4739
4741 if (transform_feedback_manager_.get()) { 4740 if (transform_feedback_manager_.get()) {
4742 if (!have_context) { 4741 if (!have_context) {
4743 transform_feedback_manager_->MarkContextLost(); 4742 transform_feedback_manager_->MarkContextLost();
4744 } 4743 }
4745 transform_feedback_manager_->Destroy(); 4744 transform_feedback_manager_->Destroy();
4746 transform_feedback_manager_.reset(); 4745 transform_feedback_manager_.reset();
4747 } 4746 }
4748 4747
4749 if (image_manager_.get()) { 4748 image_manager_.reset();
4750 image_manager_->Destroy(have_context);
4751 image_manager_.reset();
4752 }
4753 4749
4754 offscreen_target_frame_buffer_.reset(); 4750 offscreen_target_frame_buffer_.reset();
4755 offscreen_target_color_texture_.reset(); 4751 offscreen_target_color_texture_.reset();
4756 offscreen_target_color_render_buffer_.reset(); 4752 offscreen_target_color_render_buffer_.reset();
4757 offscreen_target_depth_render_buffer_.reset(); 4753 offscreen_target_depth_render_buffer_.reset();
4758 offscreen_target_stencil_render_buffer_.reset(); 4754 offscreen_target_stencil_render_buffer_.reset();
4759 offscreen_saved_frame_buffer_.reset(); 4755 offscreen_saved_frame_buffer_.reset();
4760 offscreen_saved_color_texture_.reset(); 4756 offscreen_saved_color_texture_.reset();
4761 offscreen_resolved_frame_buffer_.reset(); 4757 offscreen_resolved_frame_buffer_.reset();
4762 offscreen_resolved_color_texture_.reset(); 4758 offscreen_resolved_color_texture_.reset();
(...skipping 13997 matching lines...) Expand 10 before | Expand all | Expand 10 after
18760 } 18756 }
18761 18757
18762 // Include the auto-generated part of this file. We split this because it means 18758 // Include the auto-generated part of this file. We split this because it means
18763 // we can easily edit the non-auto generated parts right here in this file 18759 // we can easily edit the non-auto generated parts right here in this file
18764 // instead of having to edit some template or the code generator. 18760 // instead of having to edit some template or the code generator.
18765 #include "base/macros.h" 18761 #include "base/macros.h"
18766 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18762 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18767 18763
18768 } // namespace gles2 18764 } // namespace gles2
18769 } // namespace gpu 18765 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698