~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

Viewing changes to src/client/mesa/native_surface.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
ImportĀ upstreamĀ versionĀ 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
}
47
47
 
48
48
mclm::NativeSurface::NativeSurface(ClientSurface& surface)
49
 
    : surface(surface)
 
49
    : starting(true), surface(surface)
50
50
{
51
51
    surface_advance_buffer = advance_buffer_static;
52
52
    surface_get_parameters = get_parameters_static;
55
55
 
56
56
int mclm::NativeSurface::advance_buffer(MirBufferPackage* buffer_package)
57
57
{
58
 
    surface.request_and_wait_for_next_buffer();
 
58
    /*
 
59
     * At present dri2_create_mir_window_surface will trigger
 
60
     * mir_advance_colour_buffer which will land here. Since we're still
 
61
     * creating the window, we don't have any buffers we want the server to
 
62
     * composite, so avoid sending a request to the server on startup:
 
63
     */
 
64
    if (starting)
 
65
        starting = false;
 
66
    else
 
67
        surface.request_and_wait_for_next_buffer();
 
68
 
59
69
    auto buffer = surface.get_current_buffer();
60
70
 
61
71
    auto buffer_to_driver = buffer->native_buffer_handle();