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

Side by Side Diff: cc/output/output_surface.cc

Issue 781683005: Ozone: Avoid blocking in Swapbuffer Call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unintended changes. Created 6 years 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "cc/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "cc/output/managed_memory_policy.h" 10 #include "cc/output/managed_memory_policy.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 base::Bind(&OutputSurface::OnSwapBuffersComplete, 211 base::Bind(&OutputSurface::OnSwapBuffersComplete,
212 weak_ptr_factory_.GetWeakPtr())); 212 weak_ptr_factory_.GetWeakPtr()));
213 } 213 }
214 214
215 // We don't post tasks bound to the client directly since they might run 215 // We don't post tasks bound to the client directly since they might run
216 // after the OutputSurface has been destroyed. 216 // after the OutputSurface has been destroyed.
217 void OutputSurface::OnSwapBuffersComplete() { 217 void OutputSurface::OnSwapBuffersComplete() {
218 client_->DidSwapBuffersComplete(); 218 client_->DidSwapBuffersComplete();
219 } 219 }
220 220
221 void OutputSurface::OnPageFlipComplete() {
222 }
223
221 void OutputSurface::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { 224 void OutputSurface::SetMemoryPolicy(const ManagedMemoryPolicy& policy) {
222 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", 225 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy",
223 "bytes_limit_when_visible", policy.bytes_limit_when_visible); 226 "bytes_limit_when_visible", policy.bytes_limit_when_visible);
224 // Just ignore the memory manager when it says to set the limit to zero 227 // Just ignore the memory manager when it says to set the limit to zero
225 // bytes. This will happen when the memory manager thinks that the renderer 228 // bytes. This will happen when the memory manager thinks that the renderer
226 // is not visible (which the renderer knows better). 229 // is not visible (which the renderer knows better).
227 if (policy.bytes_limit_when_visible) 230 if (policy.bytes_limit_when_visible)
228 client_->SetMemoryPolicy(policy); 231 client_->SetMemoryPolicy(policy);
229 } 232 }
230 233
231 } // namespace cc 234 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698