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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: create cc::LatencyInfo Created 7 years, 11 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
13 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
14 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
17 #include "content/browser/renderer_host/image_transport_factory.h" 18 #include "content/browser/renderer_host/image_transport_factory.h"
18 #include "content/browser/renderer_host/render_widget_host_view_base.h" 19 #include "content/browser/renderer_host/render_widget_host_view_base.h"
19 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
20 #include "third_party/skia/include/core/SkRegion.h" 21 #include "third_party/skia/include/core/SkRegion.h"
21 #include "ui/aura/client/activation_change_observer.h" 22 #include "ui/aura/client/activation_change_observer.h"
22 #include "ui/aura/client/activation_delegate.h" 23 #include "ui/aura/client/activation_delegate.h"
23 #include "ui/aura/client/focus_change_observer.h" 24 #include "ui/aura/client/focus_change_observer.h"
24 #include "ui/aura/window_delegate.h" 25 #include "ui/aura/window_delegate.h"
25 #include "ui/base/ime/text_input_client.h" 26 #include "ui/base/ime/text_input_client.h"
26 #include "ui/compositor/compositor.h" 27 #include "ui/compositor/compositor.h"
27 #include "ui/compositor/compositor_observer.h" 28 #include "ui/compositor/compositor_observer.h"
28 #include "ui/gfx/display_observer.h" 29 #include "ui/gfx/display_observer.h"
29 #include "ui/gfx/rect.h" 30 #include "ui/gfx/rect.h"
31 #include "webkit/compositor_bindings/web_latency_info_impl.h"
30 #include "webkit/glue/webcursor.h" 32 #include "webkit/glue/webcursor.h"
31 33
32 namespace aura { 34 namespace aura {
33 class WindowTracker; 35 class WindowTracker;
34 } 36 }
35 37
36 namespace gfx { 38 namespace gfx {
37 class Canvas; 39 class Canvas;
38 class Display; 40 class Display;
39 } 41 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 class WindowObserver; 226 class WindowObserver;
225 friend class WindowObserver; 227 friend class WindowObserver;
226 228
227 // Overridden from ui::CompositorObserver: 229 // Overridden from ui::CompositorObserver:
228 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE; 230 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE;
229 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE; 231 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE;
230 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; 232 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE;
231 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE; 233 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE;
232 virtual void OnCompositingLockStateChanged( 234 virtual void OnCompositingLockStateChanged(
233 ui::Compositor* compositor) OVERRIDE; 235 ui::Compositor* compositor) OVERRIDE;
236 virtual void OnReceivedLatencyInfo(ui::Compositor* compositor,
237 const cc::LatencyInfo& latency_info) OVERRIDE;
234 238
235 // Overridden from ImageTransportFactoryObserver: 239 // Overridden from ImageTransportFactoryObserver:
236 virtual void OnLostResources() OVERRIDE; 240 virtual void OnLostResources() OVERRIDE;
237 241
238 virtual ~RenderWidgetHostViewAura(); 242 virtual ~RenderWidgetHostViewAura();
239 243
240 void UpdateCursorIfOverSelf(); 244 void UpdateCursorIfOverSelf();
241 bool ShouldSkipFrame(const gfx::Size& size); 245 bool ShouldSkipFrame(const gfx::Size& size);
242 void UpdateExternalTexture(); 246 void UpdateExternalTexture();
243 ui::InputMethod* GetInputMethod() const; 247 ui::InputMethod* GetInputMethod() const;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 YES, 430 YES,
427 // We locked, so at some point we'll need to kick a frame. 431 // We locked, so at some point we'll need to kick a frame.
428 YES_DID_LOCK, 432 YES_DID_LOCK,
429 // No. A lock timed out, we need to kick a new frame before locking again. 433 // No. A lock timed out, we need to kick a new frame before locking again.
430 NO_PENDING_RENDERER_FRAME, 434 NO_PENDING_RENDERER_FRAME,
431 // No. We've got a frame, but it hasn't been committed. 435 // No. We've got a frame, but it hasn't been committed.
432 NO_PENDING_COMMIT, 436 NO_PENDING_COMMIT,
433 }; 437 };
434 CanLockCompositorState can_lock_compositor_; 438 CanLockCompositorState can_lock_compositor_;
435 439
440 struct FrameLatency {
441 cc::LatencyInfo latency_info;
442 int route_id;
443 int gpu_host_id;
444 };
445
446 std::queue<FrameLatency> frame_queue_;
447
436 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 448 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
437 }; 449 };
438 450
439 } // namespace content 451 } // namespace content
440 452
441 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 453 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698