Chromium Code Reviews| 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 <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 Loading... | |
| 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(base::AsWeakPtr(this)); |
|
piman
2014/01/09 02:10:33
Can we avoid weak pointers? Since |gpu_tracer_| is
vmiura
2014/01/09 02:57:02
Done.
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |