| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_OUTPUT_OUTPUT_SURFACE_FRAME_H_ | 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_FRAME_H_ |
| 6 #define CC_OUTPUT_OUTPUT_SURFACE_FRAME_H_ | 6 #define CC_OUTPUT_OUTPUT_SURFACE_FRAME_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/optional.h" | 11 #include "base/optional.h" |
| 12 #include "cc/cc_export.h" | 12 #include "cc/cc_export.h" |
| 13 #include "ui/events/latency_info.h" | |
| 14 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
| 15 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
| 15 #include "ui/latency/latency_info.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 // Metadata given to the OutputSurface for it to swap what was drawn and make | 19 // Metadata given to the OutputSurface for it to swap what was drawn and make |
| 20 // current frame visible. | 20 // current frame visible. |
| 21 class CC_EXPORT OutputSurfaceFrame { | 21 class CC_EXPORT OutputSurfaceFrame { |
| 22 public: | 22 public: |
| 23 OutputSurfaceFrame(); | 23 OutputSurfaceFrame(); |
| 24 OutputSurfaceFrame(OutputSurfaceFrame&& other); | 24 OutputSurfaceFrame(OutputSurfaceFrame&& other); |
| 25 ~OutputSurfaceFrame(); | 25 ~OutputSurfaceFrame(); |
| 26 | 26 |
| 27 OutputSurfaceFrame& operator=(OutputSurfaceFrame&& other); | 27 OutputSurfaceFrame& operator=(OutputSurfaceFrame&& other); |
| 28 | 28 |
| 29 gfx::Size size; | 29 gfx::Size size; |
| 30 // Providing both |sub_buffer_rect| and |content_bounds| is not supported; | 30 // Providing both |sub_buffer_rect| and |content_bounds| is not supported; |
| 31 // if neither is present, regular swap is used. | 31 // if neither is present, regular swap is used. |
| 32 // Optional rect for partial or empty swap. | 32 // Optional rect for partial or empty swap. |
| 33 base::Optional<gfx::Rect> sub_buffer_rect; | 33 base::Optional<gfx::Rect> sub_buffer_rect; |
| 34 // Optional content area for SwapWithBounds. Rectangles may overlap. | 34 // Optional content area for SwapWithBounds. Rectangles may overlap. |
| 35 std::vector<gfx::Rect> content_bounds; | 35 std::vector<gfx::Rect> content_bounds; |
| 36 std::vector<ui::LatencyInfo> latency_info; | 36 std::vector<ui::LatencyInfo> latency_info; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(OutputSurfaceFrame); | 39 DISALLOW_COPY_AND_ASSIGN(OutputSurfaceFrame); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace cc | 42 } // namespace cc |
| 43 | 43 |
| 44 #endif // CC_OUTPUT_OUTPUT_SURFACE_FRAME_H_ | 44 #endif // CC_OUTPUT_OUTPUT_SURFACE_FRAME_H_ |
| OLD | NEW |