• apatrick@chromium.org's avatar
    Ensure that PresentThreadPool is initialized on the UI thread. · 5d511a16
    apatrick@chromium.org authored
    It was being initialized lazily on the IO thread when the first AsyncPresentAndAcknowledge came in.
    
    Also, the AcceleratedSurface::presenter_ variable was mutable, initialized on the IO thread and used on the IO and UI thread with no lock. I think this allowed the UI thread to attempt to use a partially initialized AcceleratedPresenter. I made presenter_ immutable and ensured that the AcceleratedPresenter is instead always created on the UI thread and not visible in partially constructed form on the IO thread.
    
    I had to change the timing of the Direct3D device initialization so that it is not created if it is not needed because that can crash windows bots.
    
    BUG=117453
    
    Review URL: http://codereview.chromium.org/9694015
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126741 0039d316-1c4b-4281-b951-d872f2087c98
    5d511a16
accelerated_surface_win.cc 13.1 KB