Setup a experiment to enable background tracing.
[chromium-blink-merge.git] / cc / debug / frame_timing_request.h
blobaedd72052983581b95d9ee123d3040579b130ca3
1 // Copyright 2015 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_DEBUG_FRAME_TIMING_REQUEST_H_
6 #define CC_DEBUG_FRAME_TIMING_REQUEST_H_
8 #include "cc/base/cc_export.h"
9 #include "ui/gfx/geometry/rect.h"
11 namespace cc {
13 // This class represents a request to record frame timing information about the
14 // given rect (in layer space) and an associated request id. When this request
15 // is propagated to the active LayerImpl, it will cause events to be saved in
16 // FrameTimingTracker, which in turn can be consumed by the requester.
17 class CC_EXPORT FrameTimingRequest {
18 public:
19 FrameTimingRequest();
20 FrameTimingRequest(int64_t request_id, const gfx::Rect& rect);
22 // Return the ID for the request.
23 int64_t id() const { return id_; }
25 // Return the layer space rect for this request.
26 const gfx::Rect& rect() const { return rect_; }
28 bool operator==(const FrameTimingRequest& other) const {
29 return (id_ == other.id_) && (rect_ == other.rect_);
32 private:
33 int64_t id_;
34 gfx::Rect rect_;
37 } // namespace cc
39 #endif // CC_DEBUG_FRAME_TIMING_REQUEST_H_