| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 } | 1281 } |
| 1282 | 1282 |
| 1283 void RenderWidget::WillBeginCompositorFrame() { | 1283 void RenderWidget::WillBeginCompositorFrame() { |
| 1284 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1284 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
| 1285 | 1285 |
| 1286 // The UpdateTextInputState can result in further layout and possibly | 1286 // The UpdateTextInputState can result in further layout and possibly |
| 1287 // enable GPU acceleration so they need to be called before any painting | 1287 // enable GPU acceleration so they need to be called before any painting |
| 1288 // is done. | 1288 // is done. |
| 1289 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); | 1289 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); |
| 1290 UpdateSelectionBounds(); | 1290 UpdateSelectionBounds(); |
| 1291 |
| 1292 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_, |
| 1293 WillBeginCompositorFrame()); |
| 1291 } | 1294 } |
| 1292 | 1295 |
| 1293 void RenderWidget::DidCommitCompositorFrame() { | 1296 void RenderWidget::DidCommitCompositorFrame() { |
| 1294 FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_, | 1297 FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_, |
| 1295 DidCommitCompositorFrame()); | 1298 DidCommitCompositorFrame()); |
| 1296 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_, | 1299 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_, |
| 1297 DidCommitCompositorFrame()); | 1300 DidCommitCompositorFrame()); |
| 1298 #if defined(VIDEO_HOLE) | 1301 #if defined(VIDEO_HOLE) |
| 1299 FOR_EACH_OBSERVER(RenderFrameImpl, video_hole_frames_, | 1302 FOR_EACH_OBSERVER(RenderFrameImpl, video_hole_frames_, |
| 1300 DidCommitCompositorFrame()); | 1303 DidCommitCompositorFrame()); |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2189 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2192 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2190 video_hole_frames_.AddObserver(frame); | 2193 video_hole_frames_.AddObserver(frame); |
| 2191 } | 2194 } |
| 2192 | 2195 |
| 2193 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2196 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2194 video_hole_frames_.RemoveObserver(frame); | 2197 video_hole_frames_.RemoveObserver(frame); |
| 2195 } | 2198 } |
| 2196 #endif // defined(VIDEO_HOLE) | 2199 #endif // defined(VIDEO_HOLE) |
| 2197 | 2200 |
| 2198 } // namespace content | 2201 } // namespace content |
| OLD | NEW |