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 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2337 const scoped_refptr<gfx::GLContext>& context, | 2337 const scoped_refptr<gfx::GLContext>& context, |
2338 bool offscreen, | 2338 bool offscreen, |
2339 const gfx::Size& size, | 2339 const gfx::Size& size, |
2340 const DisallowedFeatures& disallowed_features, | 2340 const DisallowedFeatures& disallowed_features, |
2341 const std::vector<int32>& attribs) { | 2341 const std::vector<int32>& attribs) { |
2342 TRACE_EVENT0("gpu", "GLES2DecoderImpl::Initialize"); | 2342 TRACE_EVENT0("gpu", "GLES2DecoderImpl::Initialize"); |
2343 DCHECK(context->IsCurrent(surface.get())); | 2343 DCHECK(context->IsCurrent(surface.get())); |
2344 DCHECK(!context_.get()); | 2344 DCHECK(!context_.get()); |
2345 | 2345 |
2346 set_initialized(); | 2346 set_initialized(); |
2347 gpu_tracer_ = GPUTracer::Create(this); | 2347 gpu_tracer_.reset(new GPUTracer(this)); |
2348 gpu_state_tracer_ = GPUStateTracer::Create(&state_); | 2348 gpu_state_tracer_ = GPUStateTracer::Create(&state_); |
2349 // TODO(vmiura): Enable changing gpu_trace_level_ at runtime | 2349 // TODO(vmiura): Enable changing gpu_trace_level_ at runtime |
2350 gpu_trace_level_ = 2; | 2350 gpu_trace_level_ = 2; |
2351 gpu_trace_commands_ = false; | 2351 gpu_trace_commands_ = false; |
2352 | 2352 |
2353 if (CommandLine::ForCurrentProcess()->HasSwitch( | 2353 if (CommandLine::ForCurrentProcess()->HasSwitch( |
2354 switches::kEnableGPUDebugging)) { | 2354 switches::kEnableGPUDebugging)) { |
2355 set_debug(true); | 2355 set_debug(true); |
2356 } | 2356 } |
2357 | 2357 |
(...skipping 8599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10957 } | 10957 } |
10958 } | 10958 } |
10959 | 10959 |
10960 // Include the auto-generated part of this file. We split this because it means | 10960 // Include the auto-generated part of this file. We split this because it means |
10961 // we can easily edit the non-auto generated parts right here in this file | 10961 // we can easily edit the non-auto generated parts right here in this file |
10962 // instead of having to edit some template or the code generator. | 10962 // instead of having to edit some template or the code generator. |
10963 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10963 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10964 | 10964 |
10965 } // namespace gles2 | 10965 } // namespace gles2 |
10966 } // namespace gpu | 10966 } // namespace gpu |
OLD | NEW |