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 "content/browser/compositor/browser_compositor_output_surface.h" | 5 #include "content/browser/compositor/browser_compositor_output_surface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 if (!HasClient()) | 49 if (!HasClient()) |
50 return; | 50 return; |
51 | 51 |
52 // When BeginFrame scheduling is enabled, vsync info is not routed to renderer | 52 // When BeginFrame scheduling is enabled, vsync info is not routed to renderer |
53 // by using |vsync_manager_|. Instead, BeginFrame message is used. | 53 // by using |vsync_manager_|. Instead, BeginFrame message is used. |
54 if (!use_begin_frame_scheduling_) | 54 if (!use_begin_frame_scheduling_) |
55 vsync_manager_->RemoveObserver(this); | 55 vsync_manager_->RemoveObserver(this); |
56 } | 56 } |
57 | 57 |
58 void BrowserCompositorOutputSurface::Initialize() { | 58 void BrowserCompositorOutputSurface::Initialize() { |
59 capabilities_.max_frames_pending = 1; | |
60 capabilities_.adjust_deadline_for_parent = false; | 59 capabilities_.adjust_deadline_for_parent = false; |
61 } | 60 } |
62 | 61 |
63 bool BrowserCompositorOutputSurface::BindToClient( | 62 bool BrowserCompositorOutputSurface::BindToClient( |
64 cc::OutputSurfaceClient* client) { | 63 cc::OutputSurfaceClient* client) { |
65 if (!OutputSurface::BindToClient(client)) | 64 if (!OutputSurface::BindToClient(client)) |
66 return false; | 65 return false; |
67 | 66 |
68 // Don't want vsync notifications until there is a client. | 67 // Don't want vsync notifications until there is a client. |
69 if (!use_begin_frame_scheduling_) | 68 if (!use_begin_frame_scheduling_) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() { | 108 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() { |
110 return base::Closure(); | 109 return base::Closure(); |
111 } | 110 } |
112 | 111 |
113 cc::OverlayCandidateValidator* | 112 cc::OverlayCandidateValidator* |
114 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { | 113 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { |
115 return overlay_candidate_validator_.get(); | 114 return overlay_candidate_validator_.get(); |
116 } | 115 } |
117 | 116 |
118 } // namespace content | 117 } // namespace content |
OLD | NEW |