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/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 } | 1177 } |
1178 | 1178 |
1179 void RenderWidget::suppressCompositorScheduling(bool enable) { | 1179 void RenderWidget::suppressCompositorScheduling(bool enable) { |
1180 if (compositor_) | 1180 if (compositor_) |
1181 compositor_->SetSuppressScheduleComposite(enable); | 1181 compositor_->SetSuppressScheduleComposite(enable); |
1182 } | 1182 } |
1183 | 1183 |
1184 void RenderWidget::willBeginCompositorFrame() { | 1184 void RenderWidget::willBeginCompositorFrame() { |
1185 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1185 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
1186 | 1186 |
| 1187 DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy().get()); |
| 1188 |
1187 // The following two can result in further layout and possibly | 1189 // The following two can result in further layout and possibly |
1188 // enable GPU acceleration so they need to be called before any painting | 1190 // enable GPU acceleration so they need to be called before any painting |
1189 // is done. | 1191 // is done. |
1190 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); | 1192 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); |
1191 UpdateSelectionBounds(); | 1193 UpdateSelectionBounds(); |
1192 } | 1194 } |
1193 | 1195 |
1194 void RenderWidget::didBecomeReadyForAdditionalInput() { | 1196 void RenderWidget::didBecomeReadyForAdditionalInput() { |
1195 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); | 1197 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); |
1196 FlushPendingInputEventAck(); | 1198 FlushPendingInputEventAck(); |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2063 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2065 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2064 video_hole_frames_.AddObserver(frame); | 2066 video_hole_frames_.AddObserver(frame); |
2065 } | 2067 } |
2066 | 2068 |
2067 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2069 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2068 video_hole_frames_.RemoveObserver(frame); | 2070 video_hole_frames_.RemoveObserver(frame); |
2069 } | 2071 } |
2070 #endif // defined(VIDEO_HOLE) | 2072 #endif // defined(VIDEO_HOLE) |
2071 | 2073 |
2072 } // namespace content | 2074 } // namespace content |
OLD | NEW |