Edit

kc3-lang/angle/src/libANGLE/Semaphore.cpp

Branch :

  • Show log

    Commit

  • Author : Michael Spang
    Date : 2019-05-22 16:32:21
    Hash : 6bb193c8
    Message : Vulkan: Implement glImportSemaphoreFdEXT Allow importing file descriptors into semaphores on linux. This can be used to synchronize ANGLE's GL renderer with respect to vulkan composition in chromium. Bug: angleproject:3289 Change-Id: I04ba3bbb2e343baa000ff89c21c03ca36163a713 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623812 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>

  • src/libANGLE/Semaphore.cpp
  • //
    // Copyright 2019 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    // Semaphore.h: Implements the gl::Semaphore class [EXT_external_objects]
    
    #include "libANGLE/Semaphore.h"
    
    #include "common/angleutils.h"
    #include "libANGLE/renderer/GLImplFactory.h"
    #include "libANGLE/renderer/SemaphoreImpl.h"
    
    namespace gl
    {
    
    Semaphore::Semaphore(rx::GLImplFactory *factory, GLuint id)
        : RefCountObject(id), mImplementation(factory->createSemaphore())
    {}
    
    Semaphore::~Semaphore() {}
    
    void Semaphore::onDestroy(const Context *context)
    {
        mImplementation->onDestroy(context);
    }
    
    angle::Result Semaphore::importFd(Context *context, HandleType handleType, GLint fd)
    {
        return mImplementation->importFd(context, handleType, fd);
    }
    
    }  // namespace gl