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

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

Issue 130313002: Make correct GL context current during gpu_tracer processing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove weak ptr use. Handle MakeCurrent fail. Created 6 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_tracer.h » ('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 <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 const scoped_refptr<gfx::GLContext>& context, 2209 const scoped_refptr<gfx::GLContext>& context,
2210 bool offscreen, 2210 bool offscreen,
2211 const gfx::Size& size, 2211 const gfx::Size& size,
2212 const DisallowedFeatures& disallowed_features, 2212 const DisallowedFeatures& disallowed_features,
2213 const std::vector<int32>& attribs) { 2213 const std::vector<int32>& attribs) {
2214 TRACE_EVENT0("gpu", "GLES2DecoderImpl::Initialize"); 2214 TRACE_EVENT0("gpu", "GLES2DecoderImpl::Initialize");
2215 DCHECK(context->IsCurrent(surface.get())); 2215 DCHECK(context->IsCurrent(surface.get()));
2216 DCHECK(!context_.get()); 2216 DCHECK(!context_.get());
2217 2217
2218 set_initialized(); 2218 set_initialized();
2219 gpu_tracer_ = GPUTracer::Create(); 2219 gpu_tracer_ = GPUTracer::Create(this);
2220 gpu_state_tracer_ = GPUStateTracer::Create(&state_); 2220 gpu_state_tracer_ = GPUStateTracer::Create(&state_);
2221 2221
2222 if (CommandLine::ForCurrentProcess()->HasSwitch( 2222 if (CommandLine::ForCurrentProcess()->HasSwitch(
2223 switches::kEnableGPUDebugging)) { 2223 switches::kEnableGPUDebugging)) {
2224 set_debug(true); 2224 set_debug(true);
2225 } 2225 }
2226 2226
2227 if (CommandLine::ForCurrentProcess()->HasSwitch( 2227 if (CommandLine::ForCurrentProcess()->HasSwitch(
2228 switches::kEnableGPUCommandLogging)) { 2228 switches::kEnableGPUCommandLogging)) {
2229 set_log_commands(true); 2229 set_log_commands(true);
(...skipping 8407 matching lines...) Expand 10 before | Expand all | Expand 10 after
10637 DoDidUseTexImageIfNeeded(texture, texture->target()); 10637 DoDidUseTexImageIfNeeded(texture, texture->target());
10638 } 10638 }
10639 10639
10640 // Include the auto-generated part of this file. We split this because it means 10640 // Include the auto-generated part of this file. We split this because it means
10641 // we can easily edit the non-auto generated parts right here in this file 10641 // we can easily edit the non-auto generated parts right here in this file
10642 // instead of having to edit some template or the code generator. 10642 // instead of having to edit some template or the code generator.
10643 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 10643 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
10644 10644
10645 } // namespace gles2 10645 } // namespace gles2
10646 } // namespace gpu 10646 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_tracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698