~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

Viewing changes to src/client/mir_surface.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    message.set_pixel_format(params.pixel_format);
53
53
    message.set_buffer_usage(params.buffer_usage);
54
54
    message.set_output_id(params.output_id);
55
 
    
 
55
 
56
56
    server.create_surface(0, &message, &surface, gp::NewCallback(this, &MirSurface::created, callback, context));
57
57
 
58
58
    for (int i = 0; i < mir_surface_attribs; i++)
159
159
}
160
160
 
161
161
/* todo: all these conversion functions are a bit of a kludge, probably
162
 
         better to have a more developed geometry::PixelFormat that can handle this */
163
 
geom::PixelFormat MirSurface::convert_ipc_pf_to_geometry(gp::int32 pf)
 
162
         better to have a more developed MirPixelFormat that can handle this */
 
163
MirPixelFormat MirSurface::convert_ipc_pf_to_geometry(gp::int32 pf)
164
164
{
165
 
    return static_cast<geom::PixelFormat>(pf);
 
165
    return static_cast<MirPixelFormat>(pf);
166
166
}
167
167
 
168
168
void MirSurface::process_incoming_buffer()
254
254
{
255
255
    std::lock_guard<std::recursive_mutex> lock(mutex);
256
256
 
257
 
    return buffer_depository->current_buffer_id();    
 
257
    return buffer_depository->current_buffer_id();
258
258
}
259
259
 
260
260
void MirSurface::populate(MirBufferPackage& buffer_package)