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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 } | 1179 } |
1180 | 1180 |
1181 void RenderWidget::suppressCompositorScheduling(bool enable) { | 1181 void RenderWidget::suppressCompositorScheduling(bool enable) { |
1182 if (compositor_) | 1182 if (compositor_) |
1183 compositor_->SetSuppressScheduleComposite(enable); | 1183 compositor_->SetSuppressScheduleComposite(enable); |
1184 } | 1184 } |
1185 | 1185 |
1186 void RenderWidget::willBeginCompositorFrame() { | 1186 void RenderWidget::willBeginCompositorFrame() { |
1187 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1187 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
1188 | 1188 |
1189 DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy().get()); | |
1190 | |
1191 // The following two can result in further layout and possibly | 1189 // The following two can result in further layout and possibly |
1192 // 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 |
1193 // is done. | 1191 // is done. |
1194 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); | 1192 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); |
1195 UpdateSelectionBounds(); | 1193 UpdateSelectionBounds(); |
1196 } | 1194 } |
1197 | 1195 |
1198 void RenderWidget::didBecomeReadyForAdditionalInput() { | 1196 void RenderWidget::didBecomeReadyForAdditionalInput() { |
1199 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); | 1197 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); |
1200 FlushPendingInputEventAck(); | 1198 FlushPendingInputEventAck(); |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2070 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2068 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2071 video_hole_frames_.AddObserver(frame); | 2069 video_hole_frames_.AddObserver(frame); |
2072 } | 2070 } |
2073 | 2071 |
2074 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2072 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2075 video_hole_frames_.RemoveObserver(frame); | 2073 video_hole_frames_.RemoveObserver(frame); |
2076 } | 2074 } |
2077 #endif // defined(VIDEO_HOLE) | 2075 #endif // defined(VIDEO_HOLE) |
2078 | 2076 |
2079 } // namespace content | 2077 } // namespace content |
OLD | NEW |