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

« back to all changes in this revision

Viewing changes to src/client/mir_buffer_stream_api.cpp

  • Committer: Package Import Robot
  • Author(s): Alexandros Frantzis
  • Date: 2015-10-08 16:12:19 UTC
  • mto: This revision was merged to the branch mainline in revision 109.
  • Revision ID: package-import@ubuntu.com-20151008161219-emk4a1ys51yy0wjb
Tags: upstream-0.17.0+15.10.20151008.2
ImportĀ upstreamĀ versionĀ 0.17.0+15.10.20151008.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
    auto buffer_stream = reinterpret_cast<mcl::ClientBufferStream*>(opaque_stream);
181
181
    return buffer_stream->valid();
182
182
}
 
183
 
 
184
MirWaitHandle* mir_buffer_stream_set_scale(MirBufferStream* opaque_stream, float scale)
 
185
try
 
186
{
 
187
    auto buffer_stream = reinterpret_cast<mcl::ClientBufferStream*>(opaque_stream);
 
188
    if (!buffer_stream)
 
189
        return nullptr;
 
190
 
 
191
    return buffer_stream->set_scale(scale);
 
192
}
 
193
catch (std::exception const& ex)
 
194
{
 
195
    MIR_LOG_UNCAUGHT_EXCEPTION(ex);
 
196
    return nullptr;
 
197
}
 
198
 
 
199
void mir_buffer_stream_set_scale_sync(MirBufferStream* opaque_stream, float scale)
 
200
{
 
201
    auto wh = mir_buffer_stream_set_scale(opaque_stream, scale);
 
202
    if (wh)
 
203
        wh->wait_for_all();
 
204
}