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 <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 4831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4842 // ShaderTranslatorCache. | 4842 // ShaderTranslatorCache. |
4843 fragment_translator_ = NULL; | 4843 fragment_translator_ = NULL; |
4844 vertex_translator_ = NULL; | 4844 vertex_translator_ = NULL; |
4845 | 4845 |
4846 // Destroy the GPU Tracer which may own some in process GPU Timings. | 4846 // Destroy the GPU Tracer which may own some in process GPU Timings. |
4847 if (gpu_tracer_) { | 4847 if (gpu_tracer_) { |
4848 gpu_tracer_->Destroy(have_context); | 4848 gpu_tracer_->Destroy(have_context); |
4849 gpu_tracer_.reset(); | 4849 gpu_tracer_.reset(); |
4850 } | 4850 } |
4851 | 4851 |
| 4852 // Destroy the surface before the context, some surface destructors make GL |
| 4853 // calls. |
| 4854 surface_ = nullptr; |
| 4855 |
4852 if (group_.get()) { | 4856 if (group_.get()) { |
4853 group_->Destroy(this, have_context); | 4857 group_->Destroy(this, have_context); |
4854 group_ = NULL; | 4858 group_ = NULL; |
4855 } | 4859 } |
4856 | 4860 |
4857 if (context_.get()) { | 4861 if (context_.get()) { |
4858 context_->ReleaseCurrent(NULL); | 4862 context_->ReleaseCurrent(NULL); |
4859 context_ = NULL; | 4863 context_ = NULL; |
4860 } | 4864 } |
4861 } | 4865 } |
(...skipping 14272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19134 } | 19138 } |
19135 | 19139 |
19136 // Include the auto-generated part of this file. We split this because it means | 19140 // Include the auto-generated part of this file. We split this because it means |
19137 // we can easily edit the non-auto generated parts right here in this file | 19141 // we can easily edit the non-auto generated parts right here in this file |
19138 // instead of having to edit some template or the code generator. | 19142 // instead of having to edit some template or the code generator. |
19139 #include "base/macros.h" | 19143 #include "base/macros.h" |
19140 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19144 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
19141 | 19145 |
19142 } // namespace gles2 | 19146 } // namespace gles2 |
19143 } // namespace gpu | 19147 } // namespace gpu |
OLD | NEW |