forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframe_timing_request.h
39 lines (29 loc) · 1.16 KB
/
frame_timing_request.h
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
33
34
35
36
37
38
39
// Copyright 2015 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_DEBUG_FRAME_TIMING_REQUEST_H_
#define CC_DEBUG_FRAME_TIMING_REQUEST_H_
#include "cc/base/cc_export.h"
#include "ui/gfx/geometry/rect.h"
namespace cc {
// This class represents a request to record frame timing information about the
// given rect (in layer space) and an associated request id. When this request
// is propagated to the active LayerImpl, it will cause events to be saved in
// FrameTimingTracker, which in turn can be consumed by the requester.
class CC_EXPORT FrameTimingRequest {
public:
FrameTimingRequest();
FrameTimingRequest(int64_t request_id, const gfx::Rect& rect);
// Return the ID for the request.
int64_t id() const { return id_; }
// Return the layer space rect for this request.
const gfx::Rect& rect() const { return rect_; }
bool operator==(const FrameTimingRequest& other) const {
return (id_ == other.id_) && (rect_ == other.rect_);
}
private:
int64_t id_;
gfx::Rect rect_;
};
} // namespace cc
#endif // CC_DEBUG_FRAME_TIMING_REQUEST_H_