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

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: rebase Created 3 years, 8 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 | « chrome/browser/media/webrtc/native_desktop_media_list.cc ('k') | ui/gl/gl_surface_osmesa_win.cc » ('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_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 48aeec9145ddd0907106eef94e46c96446b5458c..a6629361beee563c9b87a0faef40fd4f93aa285c 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1768,11 +1768,12 @@ void RenderWidgetHostImpl::OnGpuSwapBuffersCompletedInternal(
&window_snapshot_component)) {
int sequence_number =
static_cast<int>(window_snapshot_component.sequence_number);
-#if defined(OS_MACOSX)
- // On Mac, when using CoreAnimation, 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 CoreAnimation, or 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,
« no previous file with comments | « chrome/browser/media/webrtc/native_desktop_media_list.cc ('k') | ui/gl/gl_surface_osmesa_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698