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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 15682010: Support plumbing LatencyInfo through the old software path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #include <gdk/gdkkeysyms.h> 9 #include <gdk/gdkkeysyms.h>
10 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 } 846 }
847 847
848 void RenderWidgetHostViewGtk::ImeCompositionRangeChanged( 848 void RenderWidgetHostViewGtk::ImeCompositionRangeChanged(
849 const ui::Range& range, 849 const ui::Range& range,
850 const std::vector<gfx::Rect>& character_bounds) { 850 const std::vector<gfx::Rect>& character_bounds) {
851 } 851 }
852 852
853 void RenderWidgetHostViewGtk::DidUpdateBackingStore( 853 void RenderWidgetHostViewGtk::DidUpdateBackingStore(
854 const gfx::Rect& scroll_rect, 854 const gfx::Rect& scroll_rect,
855 const gfx::Vector2d& scroll_delta, 855 const gfx::Vector2d& scroll_delta,
856 const std::vector<gfx::Rect>& copy_rects) { 856 const std::vector<gfx::Rect>& copy_rects,
857 const ui::LatencyInfo& latency_info) {
857 TRACE_EVENT0("ui::gtk", "RenderWidgetHostViewGtk::DidUpdateBackingStore"); 858 TRACE_EVENT0("ui::gtk", "RenderWidgetHostViewGtk::DidUpdateBackingStore");
859 software_latency_info_.MergeWith(latency_info);
858 860
859 if (is_hidden_) 861 if (is_hidden_)
860 return; 862 return;
861 863
862 // TODO(darin): Implement the equivalent of Win32's ScrollWindowEX. Can that 864 // TODO(darin): Implement the equivalent of Win32's ScrollWindowEX. Can that
863 // be done using XCopyArea? Perhaps similar to 865 // be done using XCopyArea? Perhaps similar to
864 // BackingStore::ScrollBackingStore? 866 // BackingStore::ScrollBackingStore?
865 if (about_to_validate_and_paint_) 867 if (about_to_validate_and_paint_)
866 invalid_rect_.Union(scroll_rect); 868 invalid_rect_.Union(scroll_rect);
867 else 869 else
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 } 1206 }
1205 if (!web_contents_switch_paint_time_.is_null()) { 1207 if (!web_contents_switch_paint_time_.is_null()) {
1206 base::TimeDelta web_contents_switch_paint_duration = 1208 base::TimeDelta web_contents_switch_paint_duration =
1207 base::TimeTicks::Now() - web_contents_switch_paint_time_; 1209 base::TimeTicks::Now() - web_contents_switch_paint_time_;
1208 UMA_HISTOGRAM_TIMES("MPArch.RWH_TabSwitchPaintDuration", 1210 UMA_HISTOGRAM_TIMES("MPArch.RWH_TabSwitchPaintDuration",
1209 web_contents_switch_paint_duration); 1211 web_contents_switch_paint_duration);
1210 // Reset web_contents_switch_paint_time_ to 0 so future tab selections are 1212 // Reset web_contents_switch_paint_time_ to 0 so future tab selections are
1211 // recorded. 1213 // recorded.
1212 web_contents_switch_paint_time_ = base::TimeTicks(); 1214 web_contents_switch_paint_time_ = base::TimeTicks();
1213 } 1215 }
1216 software_latency_info_.swap_timestamp = base::TimeTicks::HighResNow();
1217 render_widget_host->FrameSwapped(software_latency_info_);
piman 2013/06/07 02:51:30 So compared to the hardware path, this can somewha
jbauman 2013/06/07 07:28:24 Well, even in the hardware path we don't know when
1218 software_latency_info_.Clear();
1214 } else { 1219 } else {
1215 if (window) 1220 if (window)
1216 gdk_window_clear(window); 1221 gdk_window_clear(window);
1217 if (whiteout_start_time_.is_null()) 1222 if (whiteout_start_time_.is_null())
1218 whiteout_start_time_ = base::TimeTicks::Now(); 1223 whiteout_start_time_ = base::TimeTicks::Now();
1219 } 1224 }
1220 } 1225 }
1221 1226
1222 void RenderWidgetHostViewGtk::ShowCurrentCursor() { 1227 void RenderWidgetHostViewGtk::ShowCurrentCursor() {
1223 // The widget may not have a window. If that's the case, abort mission. This 1228 // The widget may not have a window. If that's the case, abort mission. This
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 gfx::PluginWindowHandle id) { 1579 gfx::PluginWindowHandle id) {
1575 plugin_container_manager_.CreatePluginContainer(id); 1580 plugin_container_manager_.CreatePluginContainer(id);
1576 } 1581 }
1577 1582
1578 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( 1583 void RenderWidgetHostViewGtk::OnDestroyPluginContainer(
1579 gfx::PluginWindowHandle id) { 1584 gfx::PluginWindowHandle id) {
1580 plugin_container_manager_.DestroyPluginContainer(id); 1585 plugin_container_manager_.DestroyPluginContainer(id);
1581 } 1586 }
1582 1587
1583 } // namespace content 1588 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698