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

Side by Side Diff: services/ui/surfaces/direct_output_surface_ozone.cc

Issue 2403373002: cc: Clean up OutputSurfaceClient. (Closed)
Patch Set: osclient: rebase Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « services/ui/surfaces/direct_output_surface.cc ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698