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

Side by Side Diff: content/browser/renderer_host/render_widget_helper.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque>
9 #include <map> 10 #include <map>
10 11
11 #include "base/atomic_sequence_num.h" 12 #include "base/atomic_sequence_num.h"
12 #include "base/hash_tables.h" 13 #include "base/hash_tables.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/process.h" 15 #include "base/process.h"
15 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
16 #include "base/synchronization/waitable_event.h" 17 #include "base/synchronization/waitable_event.h"
17 #include "content/public/common/window_container_type.h" 18 #include "content/public/common/window_container_type.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Lookup the compositing surface corresponding to a widget ID. 154 // Lookup the compositing surface corresponding to a widget ID.
154 gfx::PluginWindowHandle LookupCompositingSurface(int render_widget_id); 155 gfx::PluginWindowHandle LookupCompositingSurface(int render_widget_id);
155 156
156 private: 157 private:
157 // A class used to proxy a paint message. PaintMsgProxy objects are created 158 // A class used to proxy a paint message. PaintMsgProxy objects are created
158 // on the IO thread and destroyed on the UI thread. 159 // on the IO thread and destroyed on the UI thread.
159 class UpdateMsgProxy; 160 class UpdateMsgProxy;
160 friend class UpdateMsgProxy; 161 friend class UpdateMsgProxy;
161 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; 162 friend class base::RefCountedThreadSafe<RenderWidgetHelper>;
162 163
163 // Map from render_widget_id to live PaintMsgProxy instance. 164 typedef std::deque<UpdateMsgProxy*> UpdateMsgProxyQueue;
164 typedef base::hash_map<int, UpdateMsgProxy*> UpdateMsgProxyMap; 165 // Map from render_widget_id to a queue of live PaintMsgProxy instances.
166 typedef base::hash_map<int, UpdateMsgProxyQueue > UpdateMsgProxyMap;
165 167
166 ~RenderWidgetHelper(); 168 ~RenderWidgetHelper();
167 169
168 // Called on the UI thread to discard a paint message. 170 // Called on the UI thread to discard a paint message.
169 void OnDiscardUpdateMsg(UpdateMsgProxy* proxy); 171 void OnDiscardUpdateMsg(UpdateMsgProxy* proxy);
170 172
171 // Called on the UI thread to dispatch a paint message if necessary. 173 // Called on the UI thread to dispatch a paint message if necessary.
172 void OnDispatchUpdateMsg(UpdateMsgProxy* proxy); 174 void OnDispatchUpdateMsg(UpdateMsgProxy* proxy);
173 175
174 // Called on the UI thread to finish creating a window. 176 // Called on the UI thread to finish creating a window.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 222
221 // The next routing id to use. 223 // The next routing id to use.
222 base::AtomicSequenceNumber next_routing_id_; 224 base::AtomicSequenceNumber next_routing_id_;
223 225
224 ResourceDispatcherHost* resource_dispatcher_host_; 226 ResourceDispatcherHost* resource_dispatcher_host_;
225 227
226 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); 228 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper);
227 }; 229 };
228 230
229 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 231 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/browser/renderer_host/render_widget_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698