| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/surfaces/onscreen_display_client.h" | 5 #include "cc/surfaces/onscreen_display_client.h" |
| 6 | 6 |
| 7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 #include "cc/output/output_surface.h" | 8 #include "cc/output/output_surface.h" |
| 9 #include "cc/surfaces/surface_display_output_surface.h" | 9 #include "cc/surfaces/surface_display_output_surface.h" |
| 10 #include "cc/surfaces/surface_factory.h" | 10 #include "cc/surfaces/surface_factory.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 void OnscreenDisplayClient::DidSwapBuffersComplete() { | 84 void OnscreenDisplayClient::DidSwapBuffersComplete() { |
| 85 pending_frames_--; | 85 pending_frames_--; |
| 86 if ((pending_frames_ < display_->GetMaxFramesPending()) && deferred_draw_) { | 86 if ((pending_frames_ < display_->GetMaxFramesPending()) && deferred_draw_) { |
| 87 deferred_draw_ = false; | 87 deferred_draw_ = false; |
| 88 ScheduleDraw(); | 88 ScheduleDraw(); |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 void OnscreenDisplayClient::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { | |
| 93 surface_display_output_surface_->SetMemoryPolicy(policy); | |
| 94 } | |
| 95 | |
| 96 } // namespace cc | 92 } // namespace cc |
| OLD | NEW |