Index: content/renderer/render_widget.h |
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h |
index 4c0b2529df1c8f7fc4393a629c50be5de146cda7..0f8a48b3c0443c7f2b89bd150b43914b7589058f 100644 |
--- a/content/renderer/render_widget.h |
+++ b/content/renderer/render_widget.h |
@@ -6,6 +6,7 @@ |
#define CONTENT_RENDERER_RENDER_WIDGET_H_ |
#pragma once |
+#include <queue> |
#include <vector> |
#include "base/basictypes.h" |
@@ -63,6 +64,9 @@ class PluginInstance; |
} // namespace ppapi |
} // namespace webkit |
+struct ViewHostMsg_UpdateRect_Params; |
jam
2011/11/11 03:03:45
nit: i thought the convention was to put this befo
piman
2011/11/16 01:00:55
Done.
|
+class ViewHostMsg_UpdateRect; |
+ |
// RenderWidget provides a communication bridge between a WebWidget and |
// a RenderWidgetHost, the latter of which lives in a different process. |
class CONTENT_EXPORT RenderWidget |
@@ -273,11 +277,6 @@ class CONTENT_EXPORT RenderWidget |
void WillToggleFullscreen(); |
void DidToggleFullscreen(); |
- // True if an UpdateRect_ACK message is pending. |
- bool update_reply_pending() const { |
- return update_reply_pending_; |
- } |
- |
bool next_paint_is_resize_ack() const; |
bool next_paint_is_restore_ack() const; |
void set_next_paint_is_resize_ack(); |
@@ -473,6 +472,17 @@ class CONTENT_EXPORT RenderWidget |
bool has_disable_gpu_vsync_switch_; |
base::TimeTicks last_do_deferred_update_time_; |
+ // UpdateRect parameters for the current compositing pass. This is used to |
+ // pass state between DoDeferredUpdate and OnSwapBuffersPosted. |
+ scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; |
+ |
+ // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to |
+ // delay sending of UpdateRect until the corresponding SwapBuffers has been |
+ // executed. Since we can have several in flight, we need to keep them in a |
+ // queue. Note: some SwapBuffers may not correspond to an update, in which |
+ // case NULL is added to the queue. |
+ std::queue<ViewHostMsg_UpdateRect*> updates_pending_swap_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
}; |