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

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

Issue 2629633003: 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 4829 matching lines...) Expand 10 before | Expand all | Expand 10 after
4840 // ShaderTranslatorCache. 4840 // ShaderTranslatorCache.
4841 fragment_translator_ = NULL; 4841 fragment_translator_ = NULL;
4842 vertex_translator_ = NULL; 4842 vertex_translator_ = NULL;
4843 4843
4844 // Destroy the GPU Tracer which may own some in process GPU Timings. 4844 // Destroy the GPU Tracer which may own some in process GPU Timings.
4845 if (gpu_tracer_) { 4845 if (gpu_tracer_) {
4846 gpu_tracer_->Destroy(have_context); 4846 gpu_tracer_->Destroy(have_context);
4847 gpu_tracer_.reset(); 4847 gpu_tracer_.reset();
4848 } 4848 }
4849 4849
4850 // Destroy the surface before the context, some surface destructors make GL
4851 // calls.
4852 surface_ = nullptr;
jbauman 2017/01/18 21:32:09 This puts it in a pretty weird state where the und
Geoff Lang 2017/01/19 15:40:06 I did some investigating and it looks like the con
4853
4850 if (group_.get()) { 4854 if (group_.get()) {
4851 group_->Destroy(this, have_context); 4855 group_->Destroy(this, have_context);
4852 group_ = NULL; 4856 group_ = NULL;
4853 } 4857 }
4854 4858
4855 if (context_.get()) { 4859 if (context_.get()) {
4856 context_->ReleaseCurrent(NULL); 4860 context_->ReleaseCurrent(NULL);
4857 context_ = NULL; 4861 context_ = NULL;
4858 } 4862 }
4859 } 4863 }
(...skipping 14273 matching lines...) Expand 10 before | Expand all | Expand 10 after
19133 } 19137 }
19134 19138
19135 // Include the auto-generated part of this file. We split this because it means 19139 // Include the auto-generated part of this file. We split this because it means
19136 // we can easily edit the non-auto generated parts right here in this file 19140 // we can easily edit the non-auto generated parts right here in this file
19137 // instead of having to edit some template or the code generator. 19141 // instead of having to edit some template or the code generator.
19138 #include "base/macros.h" 19142 #include "base/macros.h"
19139 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 19143 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
19140 19144
19141 } // namespace gles2 19145 } // namespace gles2
19142 } // namespace gpu 19146 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698