Chromium Code Reviews| Index: chrome/browser/renderer_host/render_widget_host_view_win.h |
| diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.h b/chrome/browser/renderer_host/render_widget_host_view_win.h |
| index d90487c500460a2dc34a0a50de3f7132f5646442..3a24cc121ba15dd8355771976d0d8106bc508c13 100644 |
| --- a/chrome/browser/renderer_host/render_widget_host_view_win.h |
| +++ b/chrome/browser/renderer_host/render_widget_host_view_win.h |
| @@ -75,6 +75,14 @@ class RenderWidgetHostViewWin |
| void CreateWnd(HWND parent); |
| + // This method schedules and waits for compositing unless it was already done |
| + // during this windows event handling loop. |
| + // render_widget_host_->ScheduleComposite() blocks waiting for rendering |
| + // results. ScheduleCompositeIfNeeded can be called in response to a WM_PAINT |
| + // message to the compositor window or an OnPaint message to the parent |
| + // window, or both, and we only want to wait once. |
| + void ScheduleCompositeIfNeeded(); |
| + |
| DECLARE_WND_CLASS_EX(kRenderWidgetHostHWNDClass, CS_DBLCLKS, 0); |
| BEGIN_MSG_MAP(RenderWidgetHostHWND) |
| @@ -268,6 +276,9 @@ class RenderWidgetHostViewWin |
| // Clean up the compositor window, if needed. |
| void CleanupCompositorWindow(); |
| + // Reset was_compositing_just_scheduled_ to false. |
| + void ResetWasCompositingJustScheduled(); |
| + |
| // Whether the window should be activated. |
| bool IsActivatable() const; |
| @@ -277,6 +288,13 @@ class RenderWidgetHostViewWin |
| // When we are doing accelerated compositing |
| HWND compositor_host_window_; |
| + // This bool is set to true on the first call to ScheduleComposite, and an |
|
darin (slow to review)
2011/05/26 23:03:06
ScheduleComposite -> ScheduleCompositeIfNeeded, ri
|
| + // async task is posted to reset it to false. |
| + // This is to ensure that the blocking call to |
| + // render_widget_host_->ScheduleComposite() only happens once for the same |
| + // set of windows WM_PAINT/OnPaint events. |
| + bool was_compositing_just_scheduled_; |
| + |
| // true if the compositor host window must be hidden after the |
| // software renderered view is updated. |
| bool hide_compositor_window_at_next_paint_; |
| @@ -331,6 +349,9 @@ class RenderWidgetHostViewWin |
| // Factory used to safely scope delayed calls to ShutdownHost(). |
| ScopedRunnableMethodFactory<RenderWidgetHostViewWin> shutdown_factory_; |
| + // Factory used to safely scope calls to RenderWidgetHostViewWin methods. |
| + ScopedRunnableMethodFactory<RenderWidgetHostViewWin> method_factory_; |
| + |
| // Our parent HWND. We keep a reference to it as we SetParent(NULL) when |
| // hidden to prevent getting messages (Paint, Resize...), and we reattach |
| // when shown again. |