Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2096)

Unified Diff: content/renderer/render_widget.h

Issue 8498036: Delay UpdateRect until the SwapBuffers callback when accelerated compositing is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698