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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 BrowserCompositorOutputSurface::~BrowserCompositorOutputSurface() { | 54 BrowserCompositorOutputSurface::~BrowserCompositorOutputSurface() { |
55 if (reflector_) | 55 if (reflector_) |
56 reflector_->DetachFromOutputSurface(); | 56 reflector_->DetachFromOutputSurface(); |
57 DCHECK(!reflector_); | 57 DCHECK(!reflector_); |
58 } | 58 } |
59 | 59 |
60 void BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu( | 60 void BrowserCompositorOutputSurface::OnUpdateVSyncParametersFromGpu( |
61 base::TimeTicks timebase, | 61 base::TimeTicks timebase, |
62 base::TimeDelta interval) { | 62 base::TimeDelta interval) { |
63 DCHECK(client_); // BindToClient should have been called already. | |
64 | |
65 if (interval.is_zero()) { | 63 if (interval.is_zero()) { |
66 // TODO(brianderson): We should not be receiving 0 intervals. | 64 // TODO(brianderson): We should not be receiving 0 intervals. |
67 interval = cc::BeginFrameArgs::DefaultInterval(); | 65 interval = cc::BeginFrameArgs::DefaultInterval(); |
68 } | 66 } |
69 synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval); | 67 synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval); |
70 vsync_manager_->UpdateVSyncParameters(timebase, interval); | 68 vsync_manager_->UpdateVSyncParameters(timebase, interval); |
71 } | 69 } |
72 | 70 |
73 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { | 71 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { |
74 // Software mirroring is done by doing a GL copy out of the framebuffer - if | 72 // Software mirroring is done by doing a GL copy out of the framebuffer - if |
(...skipping 14 matching lines...) Expand all Loading... |
89 return overlay_candidate_validator_.get(); | 87 return overlay_candidate_validator_.get(); |
90 } | 88 } |
91 | 89 |
92 bool BrowserCompositorOutputSurface::HasExternalStencilTest() const { | 90 bool BrowserCompositorOutputSurface::HasExternalStencilTest() const { |
93 return false; | 91 return false; |
94 } | 92 } |
95 | 93 |
96 void BrowserCompositorOutputSurface::ApplyExternalStencil() {} | 94 void BrowserCompositorOutputSurface::ApplyExternalStencil() {} |
97 | 95 |
98 } // namespace content | 96 } // namespace content |
OLD | NEW |