Mir
Public Member Functions | List of all members
mir::compositor::FrameDroppingPolicyFactory Class Referenceabstract

Creator of FrameDroppingPolicies. More...

#include <frame_dropping_policy_factory.h>

Inheritance diagram for mir::compositor::FrameDroppingPolicyFactory:
[legend]

Public Member Functions

 FrameDroppingPolicyFactory ()=default
 
virtual ~FrameDroppingPolicyFactory ()=default
 
 FrameDroppingPolicyFactory (FrameDroppingPolicyFactory const &)=delete
 
FrameDroppingPolicyFactoryoperator= (FrameDroppingPolicyFactory const &)=delete
 
virtual std::unique_ptr< FrameDroppingPolicycreate_policy (std::unique_ptr< LockableCallback > drop_frame) const =0
 Create a FrameDroppingPolicy that will call drop_frame when it decides to drop a frame. More...
 

Detailed Description

Creator of FrameDroppingPolicies.

The FrameDroppingPolicyFactory is how you go from a means of dropping frames - the drop_frames parameter of create_policy - to a FrameDroppingPolicy

Constructor & Destructor Documentation

mir::compositor::FrameDroppingPolicyFactory::FrameDroppingPolicyFactory ( )
default
virtual mir::compositor::FrameDroppingPolicyFactory::~FrameDroppingPolicyFactory ( )
virtualdefault
mir::compositor::FrameDroppingPolicyFactory::FrameDroppingPolicyFactory ( FrameDroppingPolicyFactory const &  )
delete

Member Function Documentation

virtual std::unique_ptr<FrameDroppingPolicy> mir::compositor::FrameDroppingPolicyFactory::create_policy ( std::unique_ptr< LockableCallback drop_frame) const
pure virtual

Create a FrameDroppingPolicy that will call drop_frame when it decides to drop a frame.

A LockableCallback allows the user to preserve lock ordering in situations where FrameDroppingPolicy methods need to be called under external lock and the callback implementation needs to run code protected by the same lock. A FrameDroppingPolicy implementation may have internal locks of its own, which maybe acquired during callback dispatching; to preserve lock ordering LockableCallback::lock will be invoked during callback dispatch before any internal locks are acquired.

Parameters
drop_frameFunction to call when a frame needs to be dropped
lockFunction called within the callback dispatcher context before any internal locks are acquired.
unlockFunction called within the callback dispatcher context after any internal locks are released.

Implemented in mir::compositor::TimeoutFrameDroppingPolicyFactory.

FrameDroppingPolicyFactory& mir::compositor::FrameDroppingPolicyFactory::operator= ( FrameDroppingPolicyFactory const &  )
delete

The documentation for this class was generated from the following file:

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016