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 4837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4848 // ShaderTranslatorCache. | 4848 // ShaderTranslatorCache. |
4849 fragment_translator_ = NULL; | 4849 fragment_translator_ = NULL; |
4850 vertex_translator_ = NULL; | 4850 vertex_translator_ = NULL; |
4851 | 4851 |
4852 // Destroy the GPU Tracer which may own some in process GPU Timings. | 4852 // Destroy the GPU Tracer which may own some in process GPU Timings. |
4853 if (gpu_tracer_) { | 4853 if (gpu_tracer_) { |
4854 gpu_tracer_->Destroy(have_context); | 4854 gpu_tracer_->Destroy(have_context); |
4855 gpu_tracer_.reset(); | 4855 gpu_tracer_.reset(); |
4856 } | 4856 } |
4857 | 4857 |
| 4858 // Destroy the surface before the context, some surface destructors make GL |
| 4859 // calls. |
| 4860 surface_ = nullptr; |
| 4861 |
4858 if (group_.get()) { | 4862 if (group_.get()) { |
4859 group_->Destroy(this, have_context); | 4863 group_->Destroy(this, have_context); |
4860 group_ = NULL; | 4864 group_ = NULL; |
4861 } | 4865 } |
4862 | 4866 |
4863 if (context_.get()) { | 4867 if (context_.get()) { |
4864 context_->ReleaseCurrent(NULL); | 4868 context_->ReleaseCurrent(NULL); |
4865 context_ = NULL; | 4869 context_ = NULL; |
4866 } | 4870 } |
4867 } | 4871 } |
(...skipping 14357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19225 } | 19229 } |
19226 | 19230 |
19227 // Include the auto-generated part of this file. We split this because it means | 19231 // Include the auto-generated part of this file. We split this because it means |
19228 // we can easily edit the non-auto generated parts right here in this file | 19232 // we can easily edit the non-auto generated parts right here in this file |
19229 // instead of having to edit some template or the code generator. | 19233 // instead of having to edit some template or the code generator. |
19230 #include "base/macros.h" | 19234 #include "base/macros.h" |
19231 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19235 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
19232 | 19236 |
19233 } // namespace gles2 | 19237 } // namespace gles2 |
19234 } // namespace gpu | 19238 } // namespace gpu |
OLD | NEW |