~ubuntu-branches/ubuntu/vivid/mir/vivid

« back to all changes in this revision

Viewing changes to include/platform/mir/graphics/buffer_id.h

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Daniel van Vugt, Ubuntu daily release
  • Date: 2014-08-29 16:12:54 UTC
  • mfrom: (1.1.73)
  • Revision ID: package-import@ubuntu.com-20140829161254-wfnunk4fw3msth3c
Tags: 0.7.0+14.10.20140829-0ubuntu1
[ Daniel van Vugt ]
* New upstream release 0.7.0 (https://launchpad.net/mir/+milestone/0.7.0)
  - Enhancements:
    . Test suite: Reworked mechanism to override Mir client functions
    . Demo shell: Detect custom rendering (decorations) to make it
      compatible with overlay optimizations
    . Make sure to preserve fd resources until the end of the sending
      of the message
    . Add test cases and script for tracking changes to the new ABIs:
      libmircommon, libmirplatform
    . Symbols file for libmirplatform
    . Symbols file for libmircommon
    . Symbols file for libmirserver
    . Various improvements to the SessionMediator test
    . Various build related improvements
    . Print testcase output during package build
    . Abort test when InProcessServer startup fails
    . Link the integration and unit tests against the server objects
    . Add a document detailing the useful tests to run and the useful
      logs to collect when troubleshooting a new android chipset
    . Enable motion event resampling and prediction for a more responsive
      touch experience.
  - ABI summary: Servers need rebuilding, but clients do not
    . Mirclient ABI unchanged at 8
    . Mircommon ABI bumped to 1
    . Mirplatform ABI bumped to 2
    . Mirserver ABI bumped to 25
  - API changes
    . Deleted function - frontend::Shell::create_surface_for(). If you have
      the std::shared_ptr<frontend::Session> session, you can just do
      session->create_surface(params) instead to get a SurfaceId
  - Bug fixes:
    . Ensure we process lifecycle events before the nested server is torn
      down (LP: #1353465)
    . Fix race in InputTestingServerConfiguration (LP: #1354446)
    . Fix fd leaks in prompt session frontend code and tests (LP: #1353461)
    . Detect the additional things the demo shell draws on the renderable
      list and avoid calling the optimized post function if they are being
      drawn (LP: #1348330)
    . Client: Fix SIGTERM dispatch in our default lifecycle event handler
      (LP: #1353867)
    . DemoRenderer: Don't try to create a texture of width zero. 
      (LP: #1358210)
    . Fix CI failures (LP: #1358698)
    . Fix build failure: "variable ‘rc’ set but not used" which happens in
      release mode when NDEBUG is set (LP: #1358625)
    . Only enumerate exposed input surfaces to avoid delivering events to
      occluded surfaces (LP: #1359264)
    . Android: do not post driver cancelled buffers (LP: #1359406)
    . Client: Ensure our platform library stays loaded for as long as it is
      needed by other objects (LP: #1358191)
    . Examples: Register the DemoCompositor with the Scene to properly
      process visibility events (LP: #1359487)
    . Mir_demo_client_basic: Don't assert on user errors like failing to
      connect to a Mir server (LP: #1331958)
    . Tests: Explicitly depend on GMock target to avoid build races
      (LP: #1362646)

[ Ubuntu daily release ]
* New rebuild forced

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright © 2012 Canonical Ltd.
 
2
 * Copyright © 2012, 2014 Canonical Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify it
5
5
 * under the terms of the GNU Lesser General Public License version 3,
15
15
 *
16
16
 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17
17
 */
 
18
 
18
19
#ifndef MIR_GRAPHICS_BUFFER_ID_H_
19
20
#define MIR_GRAPHICS_BUFFER_ID_H_
20
21
 
21
 
#include <cstdint>
 
22
#include "mir/int_wrapper.h"
22
23
 
23
24
namespace mir
24
25
{
25
26
namespace graphics
26
27
{
27
 
class BufferID
28
 
{
29
 
public:
30
 
    BufferID() noexcept: value(id_invalid){}
31
 
    explicit BufferID(uint32_t val) : value(val) {}
32
 
    bool is_valid() const { return (id_invalid != value); }
33
 
    uint32_t as_uint32_t() const { return value; };
34
 
 
35
 
private:
36
 
    uint32_t value;
37
 
    static const uint32_t id_invalid = 0;
38
 
};
39
 
 
40
 
inline bool operator < (BufferID const& lhs, BufferID const& rhs)
41
 
{
42
 
    return lhs.as_uint32_t() < rhs.as_uint32_t();
43
 
}
44
 
 
45
 
inline bool operator == (BufferID const& lhs, BufferID const& rhs)
46
 
{
47
 
    return lhs.as_uint32_t() == rhs.as_uint32_t();
48
 
}
49
 
inline bool operator != (BufferID const& lhs, BufferID const& rhs)
50
 
{
51
 
    return lhs.as_uint32_t() != rhs.as_uint32_t();
52
 
}
53
 
 
 
28
struct BufferIdTag;
 
29
typedef IntWrapper<BufferIdTag, uint32_t> BufferID;
54
30
}
55
31
}
56
32
#endif /* MIR_GRAPHICS_BUFFER_ID_H_ */