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 9735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9746 "GLImpl", static_cast<int>(gfx::GetGLImplementation()), | 9746 "GLImpl", static_cast<int>(gfx::GetGLImplementation()), |
9747 "width", (is_offscreen ? offscreen_size_.width() : | 9747 "width", (is_offscreen ? offscreen_size_.width() : |
9748 surface_->GetSize().width())); | 9748 surface_->GetSize().width())); |
9749 TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoSwapBuffers", | 9749 TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoSwapBuffers", |
9750 "offscreen", is_offscreen, | 9750 "offscreen", is_offscreen, |
9751 "frame", this_frame_number); | 9751 "frame", this_frame_number); |
9752 { | 9752 { |
9753 TRACE_EVENT_SYNTHETIC_DELAY("gpu.PresentingFrame"); | 9753 TRACE_EVENT_SYNTHETIC_DELAY("gpu.PresentingFrame"); |
9754 } | 9754 } |
9755 | 9755 |
| 9756 ScopedGPUTrace scoped_gpu_trace(gpu_tracer_.get(), kTraceDecoder, |
| 9757 "gpu_toplevel", "SwapBuffer"); |
| 9758 |
9756 bool is_tracing; | 9759 bool is_tracing; |
9757 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"), | 9760 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"), |
9758 &is_tracing); | 9761 &is_tracing); |
9759 if (is_tracing) { | 9762 if (is_tracing) { |
9760 ScopedFrameBufferBinder binder(this, GetBackbufferServiceId()); | 9763 ScopedFrameBufferBinder binder(this, GetBackbufferServiceId()); |
9761 gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer( | 9764 gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer( |
9762 is_offscreen ? offscreen_size_ : surface_->GetSize()); | 9765 is_offscreen ? offscreen_size_ : surface_->GetSize()); |
9763 } | 9766 } |
9764 | 9767 |
9765 // If offscreen then don't actually SwapBuffers to the display. Just copy | 9768 // If offscreen then don't actually SwapBuffers to the display. Just copy |
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11640 } | 11643 } |
11641 } | 11644 } |
11642 | 11645 |
11643 // Include the auto-generated part of this file. We split this because it means | 11646 // Include the auto-generated part of this file. We split this because it means |
11644 // we can easily edit the non-auto generated parts right here in this file | 11647 // we can easily edit the non-auto generated parts right here in this file |
11645 // instead of having to edit some template or the code generator. | 11648 // instead of having to edit some template or the code generator. |
11646 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 11649 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
11647 | 11650 |
11648 } // namespace gles2 | 11651 } // namespace gles2 |
11649 } // namespace gpu | 11652 } // namespace gpu |
OLD | NEW |