[Password Generation] Don't generate passwords for custom passphrase users.
[chromium-blink-merge.git] / cc / output / begin_frame_args.h
blob025a4075c25e6b84ab9597dabac7e5c83b34ea1b
1 // Copyright 2013 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.
5 #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_
6 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_
8 #include "base/time/time.h"
9 #include "cc/base/cc_export.h"
11 namespace cc {
13 struct CC_EXPORT BeginFrameArgs {
14 // Creates an invalid set of values.
15 BeginFrameArgs();
17 // You should be able to find all instances where a BeginFrame has been
18 // created by searching for "BeginFrameArgs::Create".
19 static BeginFrameArgs Create(base::TimeTicks frame_time,
20 base::TimeTicks deadline,
21 base::TimeDelta interval);
22 static BeginFrameArgs CreateForSynchronousCompositor();
23 static BeginFrameArgs CreateForTesting();
24 static BeginFrameArgs CreateExpiredForTesting();
26 // This is the default delta that will be used to adjust the deadline when
27 // proper draw-time estimations are not yet available.
28 static base::TimeDelta DefaultDeadlineAdjustment();
30 // This is the default interval to use to avoid sprinkling the code with
31 // magic numbers.
32 static base::TimeDelta DefaultInterval();
34 // This is the default amount of time after the frame_time to retroactively
35 // send a BeginFrame that had been skipped. This only has an effect if the
36 // deadline has passed, since the deadline is also used to trigger BeginFrame
37 // retroactively.
38 static base::TimeDelta DefaultRetroactiveBeginFramePeriod();
40 bool IsValid() const { return interval >= base::TimeDelta(); }
42 base::TimeTicks frame_time;
43 base::TimeTicks deadline;
44 base::TimeDelta interval;
46 private:
47 BeginFrameArgs(base::TimeTicks frame_time,
48 base::TimeTicks deadline,
49 base::TimeDelta interval);
52 } // namespace cc
54 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_