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

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: allow multiple update messages in flight Created 9 years 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
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index b091c96dc3416fa3d9adf8232a6f316643552aff..70259c1fb6fdb3be3c04505d08c72ab824e647b4 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 <deque>
#include <vector>
#include "base/basictypes.h"
@@ -29,6 +30,9 @@
#include "ui/gfx/surface/transport_dib.h"
#include "webkit/glue/webcursor.h"
+struct ViewHostMsg_UpdateRect_Params;
+class ViewHostMsg_UpdateRect;
+
namespace IPC {
class SyncMessage;
}
@@ -274,11 +278,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();
@@ -471,6 +470,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::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidget);
};
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698