| 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 "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/debug/trace_event_synthetic_delay.h" | 10 #include "base/debug/trace_event_synthetic_delay.h" |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 void RenderWidget::didBecomeReadyForAdditionalInput() { | 1201 void RenderWidget::didBecomeReadyForAdditionalInput() { |
| 1202 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); | 1202 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); |
| 1203 FlushPendingInputEventAck(); | 1203 FlushPendingInputEventAck(); |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 void RenderWidget::DidCommitCompositorFrame() { | 1206 void RenderWidget::DidCommitCompositorFrame() { |
| 1207 FOR_EACH_OBSERVER(RenderFrameImpl, swapped_out_frames_, | 1207 FOR_EACH_OBSERVER(RenderFrameImpl, swapped_out_frames_, |
| 1208 DidCommitCompositorFrame()); | 1208 DidCommitCompositorFrame()); |
| 1209 #if defined(VIDEO_HOLE) |
| 1210 FOR_EACH_OBSERVER(RenderFrameImpl, video_hole_frames_, |
| 1211 DidCommitCompositorFrame()); |
| 1212 #endif // defined(VIDEO_HOLE) |
| 1209 } | 1213 } |
| 1210 | 1214 |
| 1211 void RenderWidget::didCommitAndDrawCompositorFrame() { | 1215 void RenderWidget::didCommitAndDrawCompositorFrame() { |
| 1212 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); | 1216 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); |
| 1213 // Accelerated FPS tick for performance tests. See | 1217 // Accelerated FPS tick for performance tests. See |
| 1214 // tab_capture_performancetest.cc. NOTE: Tests may break if this event is | 1218 // tab_capture_performancetest.cc. NOTE: Tests may break if this event is |
| 1215 // renamed or moved. | 1219 // renamed or moved. |
| 1216 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU", | 1220 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU", |
| 1217 TRACE_EVENT_SCOPE_THREAD); | 1221 TRACE_EVENT_SCOPE_THREAD); |
| 1218 // Notify subclasses that we initiated the paint operation. | 1222 // Notify subclasses that we initiated the paint operation. |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2073 } | 2077 } |
| 2074 | 2078 |
| 2075 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2079 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2076 swapped_out_frames_.AddObserver(frame); | 2080 swapped_out_frames_.AddObserver(frame); |
| 2077 } | 2081 } |
| 2078 | 2082 |
| 2079 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2083 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2080 swapped_out_frames_.RemoveObserver(frame); | 2084 swapped_out_frames_.RemoveObserver(frame); |
| 2081 } | 2085 } |
| 2082 | 2086 |
| 2087 #if defined(VIDEO_HOLE) |
| 2088 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2089 video_hole_frames_.AddObserver(frame); |
| 2090 } |
| 2091 |
| 2092 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2093 video_hole_frames_.RemoveObserver(frame); |
| 2094 } |
| 2095 #endif // defined(VIDEO_HOLE) |
| 2096 |
| 2083 } // namespace content | 2097 } // namespace content |
| OLD | NEW |