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

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

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reimplemented using ForcedRedrawSwapPromise Created 4 years, 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/output/forced_redraw_swap_promise.h"
6
7 #include "base/logging.h"
8 #include "base/trace_event/trace_event.h"
9
10 namespace cc {
11
12 ForcedRedrawSwapPromise::ForcedRedrawSwapPromise(const ui::LatencyInfo& latency)
13 : latency_(latency) {
14 }
15
16 ForcedRedrawSwapPromise::~ForcedRedrawSwapPromise() = default;
17
18 void ForcedRedrawSwapPromise::DidSwap(CompositorFrameMetadata* metadata) {
19 DCHECK(!latency_.terminated());
20 metadata->latency_info.push_back(latency_);
21 }
22
23 bool ForcedRedrawSwapPromise::DidNotSwap(DidNotSwapReason reason) {
24 return reason == DidNotSwapReason::SWAP_FAILS;
25 }
26
27 int64_t ForcedRedrawSwapPromise::TraceId() const {
28 return latency_.trace_id();
29 }
30
31 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698