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

Side by Side Diff: content/renderer/render_widget.h

Issue 10818038: Make GPU benchmarking numAnimationFrames and totalPaintTime work in software mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes per nduca comments. Created 8 years, 5 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 class ViewHostMsg_UpdateRect; 35 class ViewHostMsg_UpdateRect;
36 36
37 namespace IPC { 37 namespace IPC {
38 class SyncMessage; 38 class SyncMessage;
39 } 39 }
40 40
41 namespace WebKit { 41 namespace WebKit {
42 class WebMouseEvent; 42 class WebMouseEvent;
43 class WebTouchEvent; 43 class WebTouchEvent;
44 class WebWidget; 44 class WebWidget;
45 struct WebRenderingStats;
45 } 46 }
46 47
47 namespace content { 48 namespace content {
48 class RenderWidgetTest; 49 class RenderWidgetTest;
49 } 50 }
50 51
51 namespace gfx { 52 namespace gfx {
52 class Point; 53 class Point;
53 } 54 }
54 55
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 virtual void resetInputMethod(); 146 virtual void resetInputMethod();
146 147
147 // Called when a plugin is moved. These events are queued up and sent with 148 // Called when a plugin is moved. These events are queued up and sent with
148 // the next paint or scroll message to the host. 149 // the next paint or scroll message to the host.
149 void SchedulePluginMove(const webkit::npapi::WebPluginGeometry& move); 150 void SchedulePluginMove(const webkit::npapi::WebPluginGeometry& move);
150 151
151 // Called when a plugin window has been destroyed, to make sure the currently 152 // Called when a plugin window has been destroyed, to make sure the currently
152 // pending moves don't try to reference it. 153 // pending moves don't try to reference it.
153 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); 154 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window);
154 155
156 // Fills in a WebRenderingStats struct containing information about
157 // rendering, e.g. count of frames rendered, time spent painting.
158 // This call is relatively expensive in accelerated threaded mode,
159 // as it blocks on the compositor thread.
160 void GetRenderingStats(WebKit::WebRenderingStats&) const;
161
155 // Directs the host to begin a smooth scroll. This scroll should have the same 162 // Directs the host to begin a smooth scroll. This scroll should have the same
156 // performance characteristics as a user-initiated scroll. 163 // performance characteristics as a user-initiated scroll.
157 void BeginSmoothScroll(bool scroll_down, bool scroll_far); 164 void BeginSmoothScroll(bool scroll_down, bool scroll_far);
158 165
159 // Close the underlying WebWidget. 166 // Close the underlying WebWidget.
160 virtual void Close(); 167 virtual void Close();
161 168
162 float filtered_time_per_frame() const { 169 float filtered_time_per_frame() const {
163 return filtered_time_per_frame_; 170 return filtered_time_per_frame_;
164 } 171 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 // compositor. 542 // compositor.
536 bool is_accelerated_compositing_active_; 543 bool is_accelerated_compositing_active_;
537 544
538 base::OneShotTimer<RenderWidget> animation_timer_; 545 base::OneShotTimer<RenderWidget> animation_timer_;
539 base::Time animation_floor_time_; 546 base::Time animation_floor_time_;
540 bool animation_update_pending_; 547 bool animation_update_pending_;
541 bool invalidation_task_posted_; 548 bool invalidation_task_posted_;
542 549
543 bool has_disable_gpu_vsync_switch_; 550 bool has_disable_gpu_vsync_switch_;
544 base::TimeTicks last_do_deferred_update_time_; 551 base::TimeTicks last_do_deferred_update_time_;
552 int deferred_update_count_;
545 553
546 // UpdateRect parameters for the current compositing pass. This is used to 554 // UpdateRect parameters for the current compositing pass. This is used to
547 // pass state between DoDeferredUpdate and OnSwapBuffersPosted. 555 // pass state between DoDeferredUpdate and OnSwapBuffersPosted.
548 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; 556 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_;
549 557
550 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to 558 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to
551 // delay sending of UpdateRect until the corresponding SwapBuffers has been 559 // delay sending of UpdateRect until the corresponding SwapBuffers has been
552 // executed. Since we can have several in flight, we need to keep them in a 560 // executed. Since we can have several in flight, we need to keep them in a
553 // queue. Note: some SwapBuffers may not correspond to an update, in which 561 // queue. Note: some SwapBuffers may not correspond to an update, in which
554 // case NULL is added to the queue. 562 // case NULL is added to the queue.
555 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; 563 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_;
556 564
557 // Properties of the screen hosting this RenderWidget instance. 565 // Properties of the screen hosting this RenderWidget instance.
558 WebKit::WebScreenInfo screen_info_; 566 WebKit::WebScreenInfo screen_info_;
559 567
560 // The device scale factor. This value is computed from the DPI entries in 568 // The device scale factor. This value is computed from the DPI entries in
561 // |screen_info_| on some platforms, and defaults to 1 on other platforms. 569 // |screen_info_| on some platforms, and defaults to 1 on other platforms.
562 float device_scale_factor_; 570 float device_scale_factor_;
563 571
564 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 572 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
565 }; 573 };
566 574
567 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 575 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698