~robertcarr/mir/fix-intermittent-input-test-race

« back to all changes in this revision

Viewing changes to src/server/default_server_configuration.cpp

  • Committer: Tarmac
  • Author(s): Alexandros Frantzis
  • Date: 2013-06-28 16:03:05 UTC
  • mfrom: (774.2.3 session-snapshots)
  • Revision ID: tarmac-20130628160305-i8eep47nb7k32vhy
shell: Implement Session::take_snapshot() method.

Approved by Kevin DuBois, Robert Ancell, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#include "mir/shell/default_session_container.h"
41
41
#include "mir/shell/consuming_placement_strategy.h"
42
42
#include "mir/shell/organising_surface_factory.h"
 
43
#include "mir/shell/threaded_snapshot_strategy.h"
43
44
#include "mir/graphics/cursor.h"
44
45
#include "mir/shell/null_session_listener.h"
45
46
#include "mir/graphics/display.h"
 
47
#include "mir/graphics/gl_pixel_buffer.h"
 
48
#include "mir/graphics/gl_context.h"
46
49
#include "mir/graphics/gl_renderer.h"
47
50
#include "mir/graphics/renderer.h"
48
51
#include "mir/graphics/platform.h"
400
403
                the_shell_session_container(),
401
404
                the_shell_focus_sequence(),
402
405
                the_shell_focus_setter(),
 
406
                the_shell_snapshot_strategy(),
403
407
                the_shell_session_listener());
404
408
        });
405
409
}
406
410
 
 
411
std::shared_ptr<msh::PixelBuffer>
 
412
mir::DefaultServerConfiguration::the_shell_pixel_buffer()
 
413
{
 
414
    return shell_pixel_buffer(
 
415
        [this]()
 
416
        {
 
417
            return std::make_shared<mg::GLPixelBuffer>(
 
418
                the_display()->create_gl_context());
 
419
        });
 
420
}
 
421
 
 
422
std::shared_ptr<msh::SnapshotStrategy>
 
423
mir::DefaultServerConfiguration::the_shell_snapshot_strategy()
 
424
{
 
425
    return shell_snapshot_strategy(
 
426
        [this]()
 
427
        {
 
428
            return std::make_shared<msh::ThreadedSnapshotStrategy>(
 
429
                the_shell_pixel_buffer());
 
430
        });
 
431
}
407
432
 
408
433
std::shared_ptr<mf::Shell>
409
434
mir::DefaultServerConfiguration::the_frontend_shell()