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

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

Issue 11364221: Fixing RenderingStats vs WebRenderingStats mess (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 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 <map> 9 #include <map>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "base/timer.h" 16 #include "base/timer.h"
17 #include "cc/rendering_stats.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "content/renderer/paint_aggregator.h" 19 #include "content/renderer/paint_aggregator.h"
19 #include "ipc/ipc_listener.h" 20 #include "ipc/ipc_listener.h"
20 #include "ipc/ipc_sender.h" 21 #include "ipc/ipc_sender.h"
21 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h " 22 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h "
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputInfo.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputInfo.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidgetClient.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidgetClient.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void SchedulePluginMove(const webkit::npapi::WebPluginGeometry& move); 149 void SchedulePluginMove(const webkit::npapi::WebPluginGeometry& move);
149 150
150 // Called when a plugin window has been destroyed, to make sure the currently 151 // Called when a plugin window has been destroyed, to make sure the currently
151 // pending moves don't try to reference it. 152 // pending moves don't try to reference it.
152 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); 153 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window);
153 154
154 // Fills in a WebRenderingStats struct containing information about 155 // Fills in a WebRenderingStats struct containing information about
155 // rendering, e.g. count of frames rendered, time spent painting. 156 // rendering, e.g. count of frames rendered, time spent painting.
156 // This call is relatively expensive in threaded compositing mode, 157 // This call is relatively expensive in threaded compositing mode,
157 // as it blocks on the compositor thread. 158 // as it blocks on the compositor thread.
159 #ifdef NOT_USING_WEB_RENDERING_STATS
160 void GetRenderingStats(cc::RenderingStats&) const;
161 #else
158 void GetRenderingStats(WebKit::WebRenderingStats&) const; 162 void GetRenderingStats(WebKit::WebRenderingStats&) const;
163 #endif // NOT_USING_WEB_RENDERING_STATS
159 164
160 // Fills in a GpuRenderingStats struct containing information about 165 // Fills in a GpuRenderingStats struct containing information about
161 // GPU rendering, e.g. count of texture uploads performed, time spent 166 // GPU rendering, e.g. count of texture uploads performed, time spent
162 // uploading. 167 // uploading.
163 // This call is relatively expensive as it blocks on the GPU process 168 // This call is relatively expensive as it blocks on the GPU process
164 bool GetGpuRenderingStats(GpuRenderingStats*) const; 169 bool GetGpuRenderingStats(GpuRenderingStats*) const;
165 170
166 // Callback for use with BeginSmoothScroll. 171 // Callback for use with BeginSmoothScroll.
167 typedef base::Callback<void()> SmoothScrollCompletionCallback; 172 typedef base::Callback<void()> SmoothScrollCompletionCallback;
168 173
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 bool is_accelerated_compositing_active_; 590 bool is_accelerated_compositing_active_;
586 591
587 base::OneShotTimer<RenderWidget> animation_timer_; 592 base::OneShotTimer<RenderWidget> animation_timer_;
588 base::Time animation_floor_time_; 593 base::Time animation_floor_time_;
589 bool animation_update_pending_; 594 bool animation_update_pending_;
590 bool invalidation_task_posted_; 595 bool invalidation_task_posted_;
591 596
592 bool has_disable_gpu_vsync_switch_; 597 bool has_disable_gpu_vsync_switch_;
593 base::TimeTicks last_do_deferred_update_time_; 598 base::TimeTicks last_do_deferred_update_time_;
594 599
600 #ifdef NOT_USING_WEB_RENDERING_STATS
601 cc::RenderingStats software_stats_;
602 #else
595 WebKit::WebRenderingStats software_stats_; 603 WebKit::WebRenderingStats software_stats_;
604 #endif // NOT_USING_WEB_RENDERING_STATS
596 605
597 // UpdateRect parameters for the current compositing pass. This is used to 606 // UpdateRect parameters for the current compositing pass. This is used to
598 // pass state between DoDeferredUpdate and OnSwapBuffersPosted. 607 // pass state between DoDeferredUpdate and OnSwapBuffersPosted.
599 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; 608 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_;
600 609
601 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to 610 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to
602 // delay sending of UpdateRect until the corresponding SwapBuffers has been 611 // delay sending of UpdateRect until the corresponding SwapBuffers has been
603 // executed. Since we can have several in flight, we need to keep them in a 612 // executed. Since we can have several in flight, we need to keep them in a
604 // queue. Note: some SwapBuffers may not correspond to an update, in which 613 // queue. Note: some SwapBuffers may not correspond to an update, in which
605 // case NULL is added to the queue. 614 // case NULL is added to the queue.
(...skipping 17 matching lines...) Expand all
623 632
624 // Specified whether the compositor will run in its own thread. 633 // Specified whether the compositor will run in its own thread.
625 bool is_threaded_compositing_enabled_; 634 bool is_threaded_compositing_enabled_;
626 635
627 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 636 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
628 }; 637 };
629 638
630 } // namespace content 639 } // namespace content
631 640
632 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 641 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698