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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 311313003: DevTools: Fix for Page.captureScreenshot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed debug hook Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 38fb4785fb3934000bd67efdf558b4e3c93e30d1..a89b93582fbf13dd8c752caab54044ef909488af 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -2069,6 +2069,12 @@ void RenderWidgetHostViewMac::AddPendingLatencyInfo(
NULL)) {
should_defer = true;
}
+ if (latency_info[i].FindLatency(
+ ui::WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT,
+ render_widget_host_->GetLatencyComponentId(),
+ NULL)) {
+ should_defer = true;
+ }
}
if (should_defer) {
// Multiple pending screenshot requests will work, but if every frame
@@ -2113,8 +2119,7 @@ void RenderWidgetHostViewMac::TickPendingLatencyInfoDelay() {
base::Bind(&RenderWidgetHostViewMac::TickPendingLatencyInfoDelay,
pending_latency_info_delay_weak_ptr_factory_.GetWeakPtr()));
[compositing_iosurface_layer_ gotNewFrame];
- }
- if (software_layer_) {
+ } else {
// In software mode there is not an explicit setNeedsDisplay/display loop,
// so just wait a pretend-vsync at 60 Hz.
base::MessageLoop::current()->PostDelayedTask(
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698