summaryrefslogtreecommitdiffstats
path: root/cc/output/latency_info_swap_promise.h
blob: 9a4deb6e9c6ec2dd5ed924424c229e29102d33de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
#define CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_

#include "base/compiler_specific.h"
#include "cc/output/swap_promise.h"
#include "ui/events/latency_info.h"

namespace cc {

class CC_EXPORT LatencyInfoSwapPromise : public SwapPromise {
 public:
  explicit LatencyInfoSwapPromise(const ui::LatencyInfo& latency_info);
  ~LatencyInfoSwapPromise() override;

  void DidActivate() override {}
  void DidSwap(CompositorFrameMetadata* metadata) override;
  void DidNotSwap(DidNotSwapReason reason) override;
  void OnCommit() override;

  int64 TraceId() const override;

 private:
  ui::LatencyInfo latency_;
};

}  // namespace cc

#endif  // CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_