| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_DEBUG_FRAME_TIMING_REQUEST_H_ | 5 #ifndef CC_DEBUG_FRAME_TIMING_REQUEST_H_ |
| 6 #define CC_DEBUG_FRAME_TIMING_REQUEST_H_ | 6 #define CC_DEBUG_FRAME_TIMING_REQUEST_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | |
| 9 #include "ui/gfx/geometry/rect.h" | 8 #include "ui/gfx/geometry/rect.h" |
| 10 | 9 |
| 11 namespace cc { | 10 namespace cc { |
| 12 | 11 |
| 13 // This class represents a request to record frame timing information about the | 12 // 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 | 13 // 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 | 14 // 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. | 15 // FrameTimingTracker, which in turn can be consumed by the requester. |
| 17 class CC_EXPORT FrameTimingRequest { | 16 class FrameTimingRequest { |
| 18 public: | 17 public: |
| 19 FrameTimingRequest(); | 18 FrameTimingRequest(); |
| 20 FrameTimingRequest(int64_t request_id, const gfx::Rect& rect); | 19 FrameTimingRequest(int64_t request_id, const gfx::Rect& rect); |
| 21 | 20 |
| 22 // Return the ID for the request. | 21 // Return the ID for the request. |
| 23 int64_t id() const { return id_; } | 22 int64_t id() const { return id_; } |
| 24 | 23 |
| 25 // Return the layer space rect for this request. | 24 // Return the layer space rect for this request. |
| 26 const gfx::Rect& rect() const { return rect_; } | 25 const gfx::Rect& rect() const { return rect_; } |
| 27 | 26 |
| 28 private: | 27 private: |
| 29 int64_t id_; | 28 int64_t id_; |
| 30 gfx::Rect rect_; | 29 gfx::Rect rect_; |
| 31 }; | 30 }; |
| 32 | 31 |
| 33 } // namespace cc | 32 } // namespace cc |
| 34 | 33 |
| 35 #endif // CC_DEBUG_FRAME_TIMING_REQUEST_H_ | 34 #endif // CC_DEBUG_FRAME_TIMING_REQUEST_H_ |
| OLD | NEW |