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

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

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really revert task runner changes Created 4 years, 8 months 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 OutputSurface::OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device) 146 OutputSurface::OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device)
147 : OutputSurface(nullptr, nullptr, std::move(software_device)) {} 147 : OutputSurface(nullptr, nullptr, std::move(software_device)) {}
148 148
149 OutputSurface::OutputSurface(scoped_refptr<ContextProvider> context_provider, 149 OutputSurface::OutputSurface(scoped_refptr<ContextProvider> context_provider,
150 scoped_ptr<SoftwareOutputDevice> software_device) 150 scoped_ptr<SoftwareOutputDevice> software_device)
151 : OutputSurface(std::move(context_provider), 151 : OutputSurface(std::move(context_provider),
152 nullptr, 152 nullptr,
153 std::move(software_device)) {} 153 std::move(software_device)) {}
154 154
155 void OutputSurface::CommitVSyncParameters(base::TimeTicks timebase,
156 base::TimeDelta interval) {
157 TRACE_EVENT2("cc",
158 "OutputSurface::CommitVSyncParameters",
159 "timebase",
160 (timebase - base::TimeTicks()).InSecondsF(),
161 "interval",
162 interval.InSecondsF());
163 client_->CommitVSyncParameters(timebase, interval);
164 }
165
166 // Forwarded to OutputSurfaceClient 155 // Forwarded to OutputSurfaceClient
167 void OutputSurface::SetNeedsRedrawRect(const gfx::Rect& damage_rect) { 156 void OutputSurface::SetNeedsRedrawRect(const gfx::Rect& damage_rect) {
168 TRACE_EVENT0("cc", "OutputSurface::SetNeedsRedrawRect"); 157 TRACE_EVENT0("cc", "OutputSurface::SetNeedsRedrawRect");
169 client_->SetNeedsRedrawRect(damage_rect); 158 client_->SetNeedsRedrawRect(damage_rect);
170 } 159 }
171 160
172 void OutputSurface::ReclaimResources(const CompositorFrameAck* ack) { 161 void OutputSurface::ReclaimResources(const CompositorFrameAck* ack) {
173 client_->ReclaimResources(ack); 162 client_->ReclaimResources(ack);
174 } 163 }
175 164
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (context_provider_.get()) { 345 if (context_provider_.get()) {
357 context_provider_->SetLostContextCallback( 346 context_provider_->SetLostContextCallback(
358 ContextProvider::LostContextCallback()); 347 ContextProvider::LostContextCallback());
359 } 348 }
360 context_provider_ = nullptr; 349 context_provider_ = nullptr;
361 client_ = nullptr; 350 client_ = nullptr;
362 weak_ptr_factory_.InvalidateWeakPtrs(); 351 weak_ptr_factory_.InvalidateWeakPtrs();
363 } 352 }
364 353
365 } // namespace cc 354 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698