| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "services/ui/surfaces/direct_output_surface_ozone.h" | 5 #include "services/ui/surfaces/direct_output_surface_ozone.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 bool force_swap = false; | 165 bool force_swap = false; |
| 166 if (result == gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS) { | 166 if (result == gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS) { |
| 167 // Even through the swap failed, this is a fixable error so we can pretend | 167 // Even through the swap failed, this is a fixable error so we can pretend |
| 168 // it succeeded to the rest of the system. | 168 // it succeeded to the rest of the system. |
| 169 result = gfx::SwapResult::SWAP_ACK; | 169 result = gfx::SwapResult::SWAP_ACK; |
| 170 buffer_queue_->RecreateBuffers(); | 170 buffer_queue_->RecreateBuffers(); |
| 171 force_swap = true; | 171 force_swap = true; |
| 172 } | 172 } |
| 173 | 173 |
| 174 buffer_queue_->PageFlipComplete(); | 174 buffer_queue_->PageFlipComplete(); |
| 175 client_->DidSwapBuffersComplete(); | 175 client_->DidReceiveSwapBuffersAck(); |
| 176 | 176 |
| 177 if (force_swap) | 177 if (force_swap) |
| 178 client_->SetNeedsRedrawRect(gfx::Rect(swap_size_)); | 178 client_->SetNeedsRedrawRect(gfx::Rect(swap_size_)); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace ui | 181 } // namespace ui |
| OLD | NEW |