Chromium Code Reviews| 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 a6e74153846a66c1dc4af81bd75b42773287d2e1..ab748723e3416f0eb148ab723fb5ebf6c0761c89 100644 |
| --- a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc |
| +++ b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc |
| @@ -73,7 +73,11 @@ void GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers( |
| // TODO(ccameron): What if a swap comes again before OnGpuSwapBuffersCompleted |
| // happens, we'd see the wrong swap size there? |
| swap_size_ = reshape_size_; |
| - buffer_queue_->SwapBuffers(frame.sub_buffer_rect); |
| + gfx::Rect damage(swap_size_); |
| + if (frame.sub_buffer_rect) { |
|
danakj
2017/02/22 00:36:57
no {} :)
|
| + damage = *frame.sub_buffer_rect; |
| + } |
| + buffer_queue_->SwapBuffers(damage); |
|
danakj
2017/02/22 00:36:57
it might be more readable with a ternary
buffer
halliwell
2017/02/22 14:19:28
I prefer the ternary form, yes.
|
| GpuBrowserCompositorOutputSurface::SwapBuffers(std::move(frame)); |
| } |