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

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

Issue 2582553002: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: . Created 3 years, 11 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 <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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_context_virtual.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698