blob: 8891d54bae2e1d49fc32c592079e8878a5aff46f [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_GFX_COMPOSITOR_BACKEND_OUTPUT_H_
#define SERVICES_GFX_COMPOSITOR_BACKEND_OUTPUT_H_
#include <memory>
#include "base/macros.h"
namespace compositor {
class RenderFrame;
class Scheduler;
// Renders snapshotted frames of the scene graph to a display output.
//
// The output object is created on the compositor's main thread and frames
// are submitted to it from there. Behind the scenes, the implementation of
// Output may use some number of worker threads. How this is accomplished
// is left up to the implementation of the Output to decide.
class Output {
public:
Output() = default;
virtual ~Output() = default;
// Gets the output's frame scheduler.
virtual Scheduler* GetScheduler() = 0;
// Submits a frame to be rendered to the display.
virtual void SubmitFrame(const std::shared_ptr<RenderFrame>& frame) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(Output);
};
} // namespace compositor
#endif // SERVICES_GFX_COMPOSITOR_BACKEND_OUTPUT_H_