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

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: Initial commit. 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 virtual float deviceScaleFactor(); 145 virtual float deviceScaleFactor();
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
nduca 2012/07/25 17:14:04 // Comment?
dtu 2012/07/27 01:40:48 Done.
156 void GetRenderingStats(WebKit::WebRenderingStats&) const;
157
155 // Directs the host to begin a smooth scroll. This scroll should have the same 158 // Directs the host to begin a smooth scroll. This scroll should have the same
156 // performance characteristics as a user-initiated scroll. 159 // performance characteristics as a user-initiated scroll.
157 void BeginSmoothScroll(bool scroll_down, bool scroll_far); 160 void BeginSmoothScroll(bool scroll_down, bool scroll_far);
158 161
159 // Close the underlying WebWidget. 162 // Close the underlying WebWidget.
160 virtual void Close(); 163 virtual void Close();
161 164
162 float filtered_time_per_frame() const { 165 float filtered_time_per_frame() const {
163 return filtered_time_per_frame_; 166 return filtered_time_per_frame_;
164 } 167 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 // compositor. 538 // compositor.
536 bool is_accelerated_compositing_active_; 539 bool is_accelerated_compositing_active_;
537 540
538 base::OneShotTimer<RenderWidget> animation_timer_; 541 base::OneShotTimer<RenderWidget> animation_timer_;
539 base::Time animation_floor_time_; 542 base::Time animation_floor_time_;
540 bool animation_update_pending_; 543 bool animation_update_pending_;
541 bool invalidation_task_posted_; 544 bool invalidation_task_posted_;
542 545
543 bool has_disable_gpu_vsync_switch_; 546 bool has_disable_gpu_vsync_switch_;
544 base::TimeTicks last_do_deferred_update_time_; 547 base::TimeTicks last_do_deferred_update_time_;
548 int total_do_deferred_update_count_;
545 549
546 // UpdateRect parameters for the current compositing pass. This is used to 550 // UpdateRect parameters for the current compositing pass. This is used to
547 // pass state between DoDeferredUpdate and OnSwapBuffersPosted. 551 // pass state between DoDeferredUpdate and OnSwapBuffersPosted.
548 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; 552 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_;
549 553
550 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to 554 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to
551 // delay sending of UpdateRect until the corresponding SwapBuffers has been 555 // 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 556 // 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 557 // queue. Note: some SwapBuffers may not correspond to an update, in which
554 // case NULL is added to the queue. 558 // case NULL is added to the queue.
555 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; 559 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_;
556 560
557 // Properties of the screen hosting this RenderWidget instance. 561 // Properties of the screen hosting this RenderWidget instance.
558 WebKit::WebScreenInfo screen_info_; 562 WebKit::WebScreenInfo screen_info_;
559 563
560 // The device scale factor. This value is computed from the DPI entries in 564 // 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. 565 // |screen_info_| on some platforms, and defaults to 1 on other platforms.
562 float device_scale_factor_; 566 float device_scale_factor_;
563 567
564 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 568 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
565 }; 569 };
566 570
567 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 571 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698