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

Unified Diff: content/renderer/render_view_impl.cc

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/renderer/render_view_impl.h ('k') | ui/events/latency_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 0eed3aa30703c18cd67bdba2c6c80ad875fcb1a4..10e4427ef5d565c8d7b761dafb239572dfde729f 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1117,6 +1117,7 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
OnReleaseDisambiguationPopupBitmap)
IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted,
OnWindowSnapshotCompleted)
+ IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw)
IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret)
#if defined(OS_ANDROID)
IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult,
@@ -1333,6 +1334,19 @@ void RenderViewImpl::GetWindowSnapshot(const WindowSnapshotCallback& callback) {
int id = next_snapshot_id_++;
pending_snapshots_.insert(std::make_pair(id, callback));
ui::LatencyInfo latency_info;
+ latency_info.AddLatencyNumber(ui::WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT,
+ 0,
+ id);
+ scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
+ if (RenderWidgetCompositor* rwc = compositor()) {
+ latency_info_swap_promise_monitor =
+ rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass();
+ }
+ ScheduleCompositeWithForcedRedraw();
+}
+
+void RenderViewImpl::OnForceRedraw(int id) {
+ ui::LatencyInfo latency_info;
latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
0,
id);
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | ui/events/latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698