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

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: Fix Display member destruction order 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
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/output_surface_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 scoped_refptr<ContextProvider> context_provider, 182 scoped_refptr<ContextProvider> context_provider,
183 std::unique_ptr<SoftwareOutputDevice> software_device) 183 std::unique_ptr<SoftwareOutputDevice> software_device)
184 : OutputSurface(std::move(context_provider), 184 : OutputSurface(std::move(context_provider),
185 nullptr, 185 nullptr,
186 #if defined(ENABLE_VULKAN) 186 #if defined(ENABLE_VULKAN)
187 nullptr, 187 nullptr,
188 #endif 188 #endif
189 std::move(software_device)) { 189 std::move(software_device)) {
190 } 190 }
191 191
192 void OutputSurface::CommitVSyncParameters(base::TimeTicks timebase,
193 base::TimeDelta interval) {
194 TRACE_EVENT2("cc",
195 "OutputSurface::CommitVSyncParameters",
196 "timebase",
197 (timebase - base::TimeTicks()).InSecondsF(),
198 "interval",
199 interval.InSecondsF());
200 client_->CommitVSyncParameters(timebase, interval);
201 }
202
203 // Forwarded to OutputSurfaceClient 192 // Forwarded to OutputSurfaceClient
204 void OutputSurface::SetNeedsRedrawRect(const gfx::Rect& damage_rect) { 193 void OutputSurface::SetNeedsRedrawRect(const gfx::Rect& damage_rect) {
205 TRACE_EVENT0("cc", "OutputSurface::SetNeedsRedrawRect"); 194 TRACE_EVENT0("cc", "OutputSurface::SetNeedsRedrawRect");
206 client_->SetNeedsRedrawRect(damage_rect); 195 client_->SetNeedsRedrawRect(damage_rect);
207 } 196 }
208 197
209 void OutputSurface::ReclaimResources(const CompositorFrameAck* ack) { 198 void OutputSurface::ReclaimResources(const CompositorFrameAck* ack) {
210 client_->ReclaimResources(ack); 199 client_->ReclaimResources(ack);
211 } 200 }
212 201
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (context_provider_.get()) { 382 if (context_provider_.get()) {
394 context_provider_->SetLostContextCallback( 383 context_provider_->SetLostContextCallback(
395 ContextProvider::LostContextCallback()); 384 ContextProvider::LostContextCallback());
396 } 385 }
397 context_provider_ = nullptr; 386 context_provider_ = nullptr;
398 client_ = nullptr; 387 client_ = nullptr;
399 weak_ptr_factory_.InvalidateWeakPtrs(); 388 weak_ptr_factory_.InvalidateWeakPtrs();
400 } 389 }
401 390
402 } // namespace cc 391 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/output_surface_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698