| 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 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2141 | 2141 |
| 2142 void RenderWidget::StartCompositor() { | 2142 void RenderWidget::StartCompositor() { |
| 2143 // For widgets that are never visible, we don't need the compositor to run | 2143 // For widgets that are never visible, we don't need the compositor to run |
| 2144 // at all. | 2144 // at all. |
| 2145 if (never_visible_) | 2145 if (never_visible_) |
| 2146 return; | 2146 return; |
| 2147 // In tests without a RenderThreadImpl, don't set ready as this kicks | 2147 // In tests without a RenderThreadImpl, don't set ready as this kicks |
| 2148 // off creating output surfaces that the test can't create. | 2148 // off creating output surfaces that the test can't create. |
| 2149 if (!RenderThreadImpl::current()) | 2149 if (!RenderThreadImpl::current()) |
| 2150 return; | 2150 return; |
| 2151 compositor_->setSurfaceReady(); | 2151 compositor_->StartCompositor(); |
| 2152 } | 2152 } |
| 2153 | 2153 |
| 2154 void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) { | 2154 void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) { |
| 2155 size_t i = 0; | 2155 size_t i = 0; |
| 2156 for (; i < plugin_window_moves_.size(); ++i) { | 2156 for (; i < plugin_window_moves_.size(); ++i) { |
| 2157 if (plugin_window_moves_[i].window == move.window) { | 2157 if (plugin_window_moves_[i].window == move.window) { |
| 2158 if (move.rects_valid) { | 2158 if (move.rects_valid) { |
| 2159 plugin_window_moves_[i] = move; | 2159 plugin_window_moves_[i] = move; |
| 2160 } else { | 2160 } else { |
| 2161 plugin_window_moves_[i].visible = move.visible; | 2161 plugin_window_moves_[i].visible = move.visible; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2325 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2325 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2326 video_hole_frames_.AddObserver(frame); | 2326 video_hole_frames_.AddObserver(frame); |
| 2327 } | 2327 } |
| 2328 | 2328 |
| 2329 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2329 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2330 video_hole_frames_.RemoveObserver(frame); | 2330 video_hole_frames_.RemoveObserver(frame); |
| 2331 } | 2331 } |
| 2332 #endif // defined(VIDEO_HOLE) | 2332 #endif // defined(VIDEO_HOLE) |
| 2333 | 2333 |
| 2334 } // namespace content | 2334 } // namespace content |
| OLD | NEW |