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

Side by Side Diff: content/browser/compositor/browser_compositor_output_surface.cc

Issue 2465093002: cc: Add OutputSurface state snapshots.
Patch Set: nits Created 4 years, 1 month 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 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
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 last_vsync_timebase_ = timebase;
64 last_vsync_interval_ = interval;
danakj 2016/11/01 23:33:01 shouldnt this be after the is_zero adjustment
reveman 2016/11/02 00:37:05 Done.
63 if (interval.is_zero()) { 65 if (interval.is_zero()) {
64 // TODO(brianderson): We should not be receiving 0 intervals. 66 // TODO(brianderson): We should not be receiving 0 intervals.
65 interval = cc::BeginFrameArgs::DefaultInterval(); 67 interval = cc::BeginFrameArgs::DefaultInterval();
66 } 68 }
67 synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval); 69 synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval);
68 vsync_manager_->UpdateVSyncParameters(timebase, interval); 70 vsync_manager_->UpdateVSyncParameters(timebase, interval);
69 } 71 }
70 72
71 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { 73 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) {
72 // Software mirroring is done by doing a GL copy out of the framebuffer - if 74 // Software mirroring is done by doing a GL copy out of the framebuffer - if
(...skipping 14 matching lines...) Expand all
87 return overlay_candidate_validator_.get(); 89 return overlay_candidate_validator_.get();
88 } 90 }
89 91
90 bool BrowserCompositorOutputSurface::HasExternalStencilTest() const { 92 bool BrowserCompositorOutputSurface::HasExternalStencilTest() const {
91 return false; 93 return false;
92 } 94 }
93 95
94 void BrowserCompositorOutputSurface::ApplyExternalStencil() {} 96 void BrowserCompositorOutputSurface::ApplyExternalStencil() {}
95 97
96 } // namespace content 98 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698