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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2752373002: Use PrintWindow() to implement snapshots on windows 8.1+ (Closed)
Patch Set: fix build Created 3 years, 9 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 9914db5ce83b44decb9fab14cf8324256ae85c9c..6ab6fc56bb8d5cff9222c1d3594dec3793a4c6ee 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2390,11 +2390,12 @@ void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) {
&window_snapshot_component)) {
int sequence_number = static_cast<int>(
window_snapshot_component.sequence_number);
-#if defined(OS_MACOSX)
- // On Mac, when using CoreAnmation, there is a delay between when content
- // is drawn to the screen, and when the snapshot will actually pick up
- // that content. Insert a manual delay of 1/6th of a second (to simulate
- // 10 frames at 60 fps) before actually taking the snapshot.
+#if defined(OS_MACOSX) || defined(OS_WIN)
+ // On Mac, when using CoreAnmation or on Win32 when using GDI, there is a
+ // delay between when content is drawn to the screen, and when the
+ // snapshot will actually pick up that content. Insert a manual delay of
+ // 1/6th of a second (to simulate 10 frames at 60 fps) before actually
+ // taking the snapshot.
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&RenderWidgetHostImpl::WindowSnapshotReachedScreen,

Powered by Google App Engine
This is Rietveld 408576698