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

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: 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 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 gfx::Rect RenderWidgetHostViewMac::GetScaledOpenGLPixelRect( 1891 gfx::Rect RenderWidgetHostViewMac::GetScaledOpenGLPixelRect(
1892 const gfx::Rect& rect) { 1892 const gfx::Rect& rect) {
1893 gfx::Rect src_gl_subrect = rect; 1893 gfx::Rect src_gl_subrect = rect;
1894 src_gl_subrect.set_y(GetViewBounds().height() - rect.bottom()); 1894 src_gl_subrect.set_y(GetViewBounds().height() - rect.bottom());
1895 1895
1896 return gfx::ToEnclosingRect(gfx::ScaleRect(src_gl_subrect, 1896 return gfx::ToEnclosingRect(gfx::ScaleRect(src_gl_subrect,
1897 scale_factor())); 1897 scale_factor()));
1898 } 1898 }
1899 1899
1900 void RenderWidgetHostViewMac::FrameSwapped() { 1900 void RenderWidgetHostViewMac::FrameSwapped() {
1901 software_latency_info_.swap_timestamp = base::TimeTicks::HighResNow(); 1901 latency_info_.Done(ui::INPUT_EVENT_LATENCY_FRAME_SWAP_COMPONENT);
1902 render_widget_host_->FrameSwapped(software_latency_info_); 1902 render_widget_host_->FrameSwapped(software_latency_info_);
1903 software_latency_info_.Clear(); 1903 software_latency_info_.Clear();
1904 } 1904 }
1905 1905
1906 } // namespace content 1906 } // namespace content
1907 1907
1908 // RenderWidgetHostViewCocoa --------------------------------------------------- 1908 // RenderWidgetHostViewCocoa ---------------------------------------------------
1909 1909
1910 @implementation RenderWidgetHostViewCocoa 1910 @implementation RenderWidgetHostViewCocoa
1911 1911
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
3843 return YES; 3843 return YES;
3844 } 3844 }
3845 3845
3846 - (BOOL)isOpaque { 3846 - (BOOL)isOpaque {
3847 if (renderWidgetHostView_->use_core_animation_) 3847 if (renderWidgetHostView_->use_core_animation_)
3848 return YES; 3848 return YES;
3849 return [super isOpaque]; 3849 return [super isOpaque];
3850 } 3850 }
3851 3851
3852 @end 3852 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698