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

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

Issue 1327343003: Force swap buffers when re-creating the buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-scanout
Patch Set: update Created 5 years, 3 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 | « cc/surfaces/display.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
index 964599b4d418a6db855913daaf16bff2b2ac0fdf..b70436b17c7c007b3c5151a2d68ebc43e0c24eae 100644
--- a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
@@ -5,6 +5,7 @@
#include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h"
#include "cc/output/compositor_frame.h"
+#include "cc/output/output_surface_client.h"
#include "content/browser/compositor/browser_compositor_overlay_candidate_validator.h"
#include "content/browser/compositor/buffer_queue.h"
#include "content/browser/compositor/reflector_impl.h"
@@ -108,14 +109,18 @@ void GpuSurfacelessBrowserCompositorOutputSurface::OnSwapBuffersCompleted(
#if defined(OS_MACOSX)
NOTREACHED();
#else
+ bool force_swap = false;
if (result == gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS) {
// Even through the swap failed, this is a fixable error so we can pretend
// it succeeded to the rest of the system.
result = gfx::SwapResult::SWAP_ACK;
output_surface_->RecreateBuffers();
+ force_swap = true;
}
GpuBrowserCompositorOutputSurface::OnSwapBuffersCompleted(latency_info,
result);
+ if (force_swap)
+ client_->SetNeedsRedrawRect(gfx::Rect(SurfaceSize()));
#endif
}
« no previous file with comments | « cc/surfaces/display.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698