~kdub/mir/fix-1301040

« back to all changes in this revision

Viewing changes to src/server/scene/surface_stack.h

provide a renderlist generated from the SurfaceStack.

This is not the final version of the interface. It is a first step towards that goal, as well as being the first step to integrating hardware optimization support down to the DisplayBuffer/HWC.

This implements a pretty shallow copy of the list. I suspect the optimal answer to 'how deep to copy' lies somewhere between a shallow copy and a deep copy, and will be hashed out in the future.

Approved by Daniel van Vugt, PS Jenkins bot, Alberto Aguirre.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "surface_stack_model.h"
23
23
 
24
24
#include "mir/compositor/scene.h"
 
25
#include "mir/graphics/renderable.h"
25
26
#include "mir/scene/depth_id.h"
26
27
#include "mir/input/input_reception_mode.h"
27
28
#include "mir/input/input_targets.h"
68
69
        std::shared_ptr<SceneReport> const& report);
69
70
    virtual ~SurfaceStack() noexcept(true) {}
70
71
 
 
72
    graphics::RenderableList generate_renderable_list() const;
71
73
    // From Scene
 
74
    virtual void set_change_callback(std::function<void()> const& f);
 
75
    //to be deprecated
72
76
    virtual void for_each_if(compositor::FilterForScene &filter, compositor::OperatorForScene &op);
73
77
    virtual void reverse_for_each_if(compositor::FilterForScene& filter,
74
78
                                     compositor::OperatorForScene& op);
75
 
    virtual void set_change_callback(std::function<void()> const& f);
76
 
 
 
79
    virtual void lock();
 
80
    virtual void unlock();
 
81
    //end to be deprecated
 
82
    
77
83
    // From InputTargets
78
84
    void for_each(std::function<void(std::shared_ptr<input::InputChannel> const&)> const& callback);
79
85
 
88
94
 
89
95
    virtual void raise(std::weak_ptr<Surface> const& surface) override;
90
96
 
91
 
    virtual void lock();
92
 
    virtual void unlock();
93
 
 
94
97
    // TODO I plan decouple the creation of surface from adding to the scene
95
98
    // (as that complicates client code wrapping the default implementation).
96
99
    // For now add_surface() is called by create_surface
105
108
 
106
109
    void emit_change_notification();
107
110
 
108
 
    std::recursive_mutex guard;
 
111
    std::recursive_mutex mutable guard;
109
112
    std::shared_ptr<BasicSurfaceFactory> const surface_factory;
110
113
    std::shared_ptr<InputRegistrar> const input_registrar;
111
114
    std::shared_ptr<SceneReport> const report;