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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 25022003: Report LatencyInfo through trace buffer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile error Created 7 years, 2 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
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 #include "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 gfx::Rect RenderWidgetHostViewMac::GetScaledOpenGLPixelRect( 1895 gfx::Rect RenderWidgetHostViewMac::GetScaledOpenGLPixelRect(
1896 const gfx::Rect& rect) { 1896 const gfx::Rect& rect) {
1897 gfx::Rect src_gl_subrect = rect; 1897 gfx::Rect src_gl_subrect = rect;
1898 src_gl_subrect.set_y(GetViewBounds().height() - rect.bottom()); 1898 src_gl_subrect.set_y(GetViewBounds().height() - rect.bottom());
1899 1899
1900 return gfx::ToEnclosingRect(gfx::ScaleRect(src_gl_subrect, 1900 return gfx::ToEnclosingRect(gfx::ScaleRect(src_gl_subrect,
1901 scale_factor())); 1901 scale_factor()));
1902 } 1902 }
1903 1903
1904 void RenderWidgetHostViewMac::FrameSwapped() { 1904 void RenderWidgetHostViewMac::FrameSwapped() {
1905 software_latency_info_.swap_timestamp = base::TimeTicks::HighResNow(); 1905 software_latency_info_.AddLatencyNumber(
1906 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
1906 render_widget_host_->FrameSwapped(software_latency_info_); 1907 render_widget_host_->FrameSwapped(software_latency_info_);
1907 software_latency_info_.Clear(); 1908 software_latency_info_.Clear();
1908 } 1909 }
1909 1910
1910 } // namespace content 1911 } // namespace content
1911 1912
1912 // RenderWidgetHostViewCocoa --------------------------------------------------- 1913 // RenderWidgetHostViewCocoa ---------------------------------------------------
1913 1914
1914 @implementation RenderWidgetHostViewCocoa 1915 @implementation RenderWidgetHostViewCocoa
1915 1916
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 return YES; 3849 return YES;
3849 } 3850 }
3850 3851
3851 - (BOOL)isOpaque { 3852 - (BOOL)isOpaque {
3852 if (renderWidgetHostView_->use_core_animation_) 3853 if (renderWidgetHostView_->use_core_animation_)
3853 return YES; 3854 return YES;
3854 return [super isOpaque]; 3855 return [super isOpaque];
3855 } 3856 }
3856 3857
3857 @end 3858 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698