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

Unified Diff: content/browser/compositor/offscreen_browser_compositor_output_surface.cc

Issue 2631263003: [headless] Fix screenshots with gpu enabled. (Closed)
Patch Set: add skia dep to build file. Created 3 years, 11 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/compositor/offscreen_browser_compositor_output_surface.h ('k') | headless/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/offscreen_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
index a4e2e14e81531fcfeac8345253bebd4219e16488..cfc771a0e31d2e4ef3746a7bb0c0d06517a1263e 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
@@ -14,6 +14,7 @@
#include "components/display_compositor/compositor_overlay_candidate_validator.h"
#include "content/browser/compositor/reflector_impl.h"
#include "content/browser/compositor/reflector_texture.h"
+#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/browser_thread.h"
#include "gpu/command_buffer/client/context_support.h"
#include "gpu/command_buffer/client/gles2_interface.h"
@@ -156,7 +157,7 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers(
sync_token,
base::Bind(
&OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete,
- weak_ptr_factory_.GetWeakPtr()));
+ weak_ptr_factory_.GetWeakPtr(), frame.latency_info));
}
bool OffscreenBrowserCompositorOutputSurface::IsDisplayedAsOverlayPlane()
@@ -185,7 +186,9 @@ void OffscreenBrowserCompositorOutputSurface::OnReflectorChanged() {
}
}
-void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete() {
+void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete(
+ const std::vector<ui::LatencyInfo>& latency_info) {
+ RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
client_->DidReceiveSwapBuffersAck();
}
« no previous file with comments | « content/browser/compositor/offscreen_browser_compositor_output_surface.h ('k') | headless/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698