~ubuntu-branches/ubuntu/wily/mir/wily-proposed

« back to all changes in this revision

Viewing changes to src/platforms/android/server/framebuffers.cpp

  • Committer: Package Import Robot
  • Author(s): CI Train Bot
  • Date: 2015-05-12 13:12:55 UTC
  • mto: This revision was merged to the branch mainline in revision 96.
  • Revision ID: package-import@ubuntu.com-20150512131255-y7z12i8n4pbvo70x
Tags: upstream-0.13.0+15.10.20150512
ImportĀ upstreamĀ versionĀ 0.13.0+15.10.20150512

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    mga::GraphicBufferAllocator& buffer_allocator,
29
29
    geom::Size size,
30
30
    MirPixelFormat format,
31
 
    double vrefresh_hz,
32
31
    unsigned int num_framebuffers) :
33
 
    format{format},
34
 
    size{size},
35
 
    refresh_rate_hz{vrefresh_hz}
 
32
    size{size}
36
33
{
37
34
    for(auto i = 0u; i < num_framebuffers; i++)
38
35
        queue.push(buffer_allocator.alloc_buffer_platform(size, format, mga::BufferUsage::use_framebuffer_gles));
39
36
}
40
37
 
41
 
MirPixelFormat mga::Framebuffers::fb_format()
42
 
{
43
 
    return format;
44
 
}
45
38
geom::Size mga::Framebuffers::fb_size()
46
39
{
47
40
    return size;
48
41
}
49
42
 
50
 
double mga::Framebuffers::fb_refresh_rate()
51
 
{
52
 
    return refresh_rate_hz;
53
 
}
54
 
 
55
43
std::shared_ptr<mg::Buffer> mga::Framebuffers::buffer_for_render()
56
44
{
57
45
    std::unique_lock<std::mutex> lk(queue_lock);