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

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

Issue 940633004: Added disjoint context class which manages disjoints within gpu timing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added releases and DCHECK in gpu_timing Created 5 years, 10 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 <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 28 matching lines...) Expand all
39 #include "gpu/command_buffer/service/context_state.h" 39 #include "gpu/command_buffer/service/context_state.h"
40 #include "gpu/command_buffer/service/error_state.h" 40 #include "gpu/command_buffer/service/error_state.h"
41 #include "gpu/command_buffer/service/feature_info.h" 41 #include "gpu/command_buffer/service/feature_info.h"
42 #include "gpu/command_buffer/service/framebuffer_manager.h" 42 #include "gpu/command_buffer/service/framebuffer_manager.h"
43 #include "gpu/command_buffer/service/gl_utils.h" 43 #include "gpu/command_buffer/service/gl_utils.h"
44 #include "gpu/command_buffer/service/gles2_cmd_clear_framebuffer.h" 44 #include "gpu/command_buffer/service/gles2_cmd_clear_framebuffer.h"
45 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h" 45 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
46 #include "gpu/command_buffer/service/gles2_cmd_validation.h" 46 #include "gpu/command_buffer/service/gles2_cmd_validation.h"
47 #include "gpu/command_buffer/service/gpu_state_tracer.h" 47 #include "gpu/command_buffer/service/gpu_state_tracer.h"
48 #include "gpu/command_buffer/service/gpu_switches.h" 48 #include "gpu/command_buffer/service/gpu_switches.h"
49 #include "gpu/command_buffer/service/gpu_timing.h"
49 #include "gpu/command_buffer/service/gpu_tracer.h" 50 #include "gpu/command_buffer/service/gpu_tracer.h"
50 #include "gpu/command_buffer/service/image_manager.h" 51 #include "gpu/command_buffer/service/image_manager.h"
51 #include "gpu/command_buffer/service/mailbox_manager.h" 52 #include "gpu/command_buffer/service/mailbox_manager.h"
52 #include "gpu/command_buffer/service/memory_tracking.h" 53 #include "gpu/command_buffer/service/memory_tracking.h"
53 #include "gpu/command_buffer/service/program_manager.h" 54 #include "gpu/command_buffer/service/program_manager.h"
54 #include "gpu/command_buffer/service/query_manager.h" 55 #include "gpu/command_buffer/service/query_manager.h"
55 #include "gpu/command_buffer/service/renderbuffer_manager.h" 56 #include "gpu/command_buffer/service/renderbuffer_manager.h"
56 #include "gpu/command_buffer/service/shader_manager.h" 57 #include "gpu/command_buffer/service/shader_manager.h"
57 #include "gpu/command_buffer/service/shader_translator.h" 58 #include "gpu/command_buffer/service/shader_translator.h"
58 #include "gpu/command_buffer/service/shader_translator_cache.h" 59 #include "gpu/command_buffer/service/shader_translator_cache.h"
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 GLsizei viewport_max_width_; 1876 GLsizei viewport_max_width_;
1876 GLsizei viewport_max_height_; 1877 GLsizei viewport_max_height_;
1877 1878
1878 // Command buffer stats. 1879 // Command buffer stats.
1879 base::TimeDelta total_processing_commands_time_; 1880 base::TimeDelta total_processing_commands_time_;
1880 1881
1881 // States related to each manager. 1882 // States related to each manager.
1882 DecoderTextureState texture_state_; 1883 DecoderTextureState texture_state_;
1883 DecoderFramebufferState framebuffer_state_; 1884 DecoderFramebufferState framebuffer_state_;
1884 1885
1886 GPUTiming gpu_timing_;
1885 scoped_ptr<GPUTracer> gpu_tracer_; 1887 scoped_ptr<GPUTracer> gpu_tracer_;
1886 scoped_ptr<GPUStateTracer> gpu_state_tracer_; 1888 scoped_ptr<GPUStateTracer> gpu_state_tracer_;
1887 const unsigned char* cb_command_trace_category_; 1889 const unsigned char* cb_command_trace_category_;
1888 const unsigned char* gpu_decoder_category_; 1890 const unsigned char* gpu_decoder_category_;
1889 int gpu_trace_level_; 1891 int gpu_trace_level_;
1890 bool gpu_trace_commands_; 1892 bool gpu_trace_commands_;
1891 bool gpu_debug_commands_; 1893 bool gpu_debug_commands_;
1892 1894
1893 std::queue<linked_ptr<FenceCallback> > pending_readpixel_fences_; 1895 std::queue<linked_ptr<FenceCallback> > pending_readpixel_fences_;
1894 1896
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 const gfx::Size& size, 2440 const gfx::Size& size,
2439 const DisallowedFeatures& disallowed_features, 2441 const DisallowedFeatures& disallowed_features,
2440 const std::vector<int32>& attribs) { 2442 const std::vector<int32>& attribs) {
2441 TRACE_EVENT0("gpu", "GLES2DecoderImpl::Initialize"); 2443 TRACE_EVENT0("gpu", "GLES2DecoderImpl::Initialize");
2442 DCHECK(context->IsCurrent(surface.get())); 2444 DCHECK(context->IsCurrent(surface.get()));
2443 DCHECK(!context_.get()); 2445 DCHECK(!context_.get());
2444 2446
2445 surfaceless_ = surface->IsSurfaceless() && !offscreen; 2447 surfaceless_ = surface->IsSurfaceless() && !offscreen;
2446 2448
2447 set_initialized(); 2449 set_initialized();
2448 gpu_tracer_.reset(new GPUTracer(this)); 2450 gpu_timing_.Initialize(context.get());
2451 gpu_tracer_.reset(new GPUTracer(this, &gpu_timing_));
2449 gpu_state_tracer_ = GPUStateTracer::Create(&state_); 2452 gpu_state_tracer_ = GPUStateTracer::Create(&state_);
2450 2453
2451 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 2454 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
2452 switches::kEnableGPUDebugging)) { 2455 switches::kEnableGPUDebugging)) {
2453 set_debug(true); 2456 set_debug(true);
2454 } 2457 }
2455 2458
2456 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 2459 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
2457 switches::kEnableGPUCommandLogging)) { 2460 switches::kEnableGPUCommandLogging)) {
2458 set_log_commands(true); 2461 set_log_commands(true);
(...skipping 9662 matching lines...) Expand 10 before | Expand all | Expand 10 after
12121 } 12124 }
12122 } 12125 }
12123 12126
12124 // Include the auto-generated part of this file. We split this because it means 12127 // Include the auto-generated part of this file. We split this because it means
12125 // we can easily edit the non-auto generated parts right here in this file 12128 // we can easily edit the non-auto generated parts right here in this file
12126 // instead of having to edit some template or the code generator. 12129 // instead of having to edit some template or the code generator.
12127 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 12130 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
12128 12131
12129 } // namespace gles2 12132 } // namespace gles2
12130 } // namespace gpu 12133 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_timing.h » ('j') | gpu/command_buffer/service/gpu_timing.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698