| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CC_DEBUG_FRAME_TIMING_REQUEST_H_ | |
| 6 #define CC_DEBUG_FRAME_TIMING_REQUEST_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "cc/base/cc_export.h" | |
| 11 #include "ui/gfx/geometry/rect.h" | |
| 12 | |
| 13 namespace cc { | |
| 14 | |
| 15 // This class represents a request to record frame timing information about the | |
| 16 // given rect (in layer space) and an associated request id. When this request | |
| 17 // is propagated to the active LayerImpl, it will cause events to be saved in | |
| 18 // FrameTimingTracker, which in turn can be consumed by the requester. | |
| 19 class CC_EXPORT FrameTimingRequest { | |
| 20 public: | |
| 21 FrameTimingRequest(); | |
| 22 FrameTimingRequest(int64_t request_id, const gfx::Rect& rect); | |
| 23 | |
| 24 // Return the ID for the request. | |
| 25 int64_t id() const { return id_; } | |
| 26 | |
| 27 // Return the layer space rect for this request. | |
| 28 const gfx::Rect& rect() const { return rect_; } | |
| 29 | |
| 30 bool operator==(const FrameTimingRequest& other) const { | |
| 31 return (id_ == other.id_) && (rect_ == other.rect_); | |
| 32 } | |
| 33 | |
| 34 private: | |
| 35 int64_t id_; | |
| 36 gfx::Rect rect_; | |
| 37 }; | |
| 38 | |
| 39 } // namespace cc | |
| 40 | |
| 41 #endif // CC_DEBUG_FRAME_TIMING_REQUEST_H_ | |
| OLD | NEW |