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 SERVICES_GFX_COMPOSITOR_BACKEND_OUTPUT_H_ |
| 6 #define SERVICES_GFX_COMPOSITOR_BACKEND_OUTPUT_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 |
| 12 namespace compositor { |
| 13 |
| 14 class RenderFrame; |
| 15 class Scheduler; |
| 16 |
| 17 // Renders snapshotted frames of the scene graph to a display output. |
| 18 // |
| 19 // The output object is created on the compositor's main thread and frames |
| 20 // are submitted to it from there. Behind the scenes, the implementation of |
| 21 // Output may use some number of worker threads. How this is accomplished |
| 22 // is left up to the implementation of the Output to decide. |
| 23 class Output { |
| 24 public: |
| 25 Output() = default; |
| 26 virtual ~Output() = default; |
| 27 |
| 28 // Gets the output's frame scheduler. |
| 29 virtual Scheduler* GetScheduler() = 0; |
| 30 |
| 31 // Submits a frame to be rendered to the display. |
| 32 virtual void SubmitFrame(const std::shared_ptr<RenderFrame>& frame) = 0; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(Output); |
| 36 }; |
| 37 |
| 38 } // namespace compositor |
| 39 |
| 40 #endif // SERVICES_GFX_COMPOSITOR_BACKEND_OUTPUT_H_ |
OLD | NEW |