Edit

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

Branch :

  • Show log

    Commit

  • Author : Geoff Lang
    Date : 2019-07-04 15:49:54
    Hash : 3fe8c3a3
    Message : Refactor the wait/signalSemaphore entry points to be on the Semaphore object Convert the texture ID parameters into optimized vectors of Texture objects. BUG=angleproject:3656 Change-Id: Iffe824ade2a919c9771642ae501ff04712ca43ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688505 Reviewed-by: Michael Spang <spang@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);
    }
    
    angle::Result Semaphore::wait(Context *context,
                                  const BufferBarrierVector &bufferBarriers,
                                  const TextureBarrierVector &textureBarriers)
    {
        return mImplementation->wait(context, bufferBarriers, textureBarriers);
    }
    
    angle::Result Semaphore::signal(Context *context,
                                    const BufferBarrierVector &bufferBarriers,
                                    const TextureBarrierVector &textureBarriers)
    {
        return mImplementation->signal(context, bufferBarriers, textureBarriers);
    }
    
    }  // namespace gl