| Index: cc/output/begin_frame_args.h
|
| diff --git a/cc/output/begin_frame_args.h b/cc/output/begin_frame_args.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9be3aae11d00e7a63f8d37410e58f48310e07e39
|
| --- /dev/null
|
| +++ b/cc/output/begin_frame_args.h
|
| @@ -0,0 +1,60 @@
|
| +// Copyright (c) 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_BEGIN_FRAME_H_
|
| +#define CC_OUTPUT_BEGIN_FRAME_H_
|
| +
|
| +#include "base/time.h"
|
| +#include "cc/base/cc_export.h"
|
| +#include "ipc/ipc_param_traits.h"
|
| +
|
| +namespace cc {
|
| +
|
| +class CC_EXPORT BeginFrameArgs {
|
| + public:
|
| + // You should be able to find all instances where a BeginFrame has been
|
| + // created by searching for "BeginFrame::Create".
|
| + static BeginFrameArgs Create(base::TimeTicks frame_time,
|
| + base::TimeTicks deadline,
|
| + base::TimeDelta interval);
|
| + static BeginFrameArgs CreateForSynchronousCompositor();
|
| + static BeginFrameArgs CreateForTesting();
|
| + static BeginFrameArgs CreateInvalid();
|
| +
|
| + // This is the default delta that will be used to adjust the deadline when
|
| + // proper draw-time estimations are not yet available.
|
| + static base::TimeDelta DefaultDeadlineAdjustment();
|
| + static base::TimeDelta DefaultInterval();
|
| +
|
| + base::TimeTicks frame_time() const {
|
| + return frame_time_;
|
| + }
|
| +
|
| + base::TimeTicks deadline() const {
|
| + return deadline_;
|
| + }
|
| +
|
| + base::TimeDelta interval() const {
|
| + return interval_;
|
| + }
|
| +
|
| + bool IsInvalid() const {
|
| + return interval_ < base::TimeDelta();
|
| + }
|
| +
|
| + private:
|
| + friend class IPC::ParamTraits<BeginFrameArgs>;
|
| +
|
| + BeginFrameArgs(base::TimeTicks frame_time,
|
| + base::TimeTicks deadline,
|
| + base::TimeDelta interval);
|
| +
|
| + base::TimeTicks frame_time_;
|
| + base::TimeTicks deadline_;
|
| + base::TimeDelta interval_;
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_OUTPUT_BEGIN_FRAME_H_
|
|
|