Edit

kc3-lang/angle/src/libANGLE/renderer/DisplayImpl.cpp

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2017-02-06 16:04:20
    Hash : 70ee0f61
    Message : Add destroy handler to SurfaceImpl. This allows the Vulkan back-end to avoid storing a reference to the VkDevice. This will extend to all the Vulkan object handle wrapper types. BUG=angleproject:1684 Change-Id: I3a98e94bc171ca27f225ce57996c3fdf9581e6e1 Reviewed-on: https://chromium-review.googlesource.com/424229 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>

  • src/libANGLE/renderer/DisplayImpl.cpp
  • //
    // Copyright (c) 2014 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.
    //
    
    // DisplayImpl.cpp: Implementation methods of egl::Display
    
    #include "libANGLE/renderer/DisplayImpl.h"
    
    #include "libANGLE/Display.h"
    #include "libANGLE/Surface.h"
    
    namespace rx
    {
    
    DisplayImpl::DisplayImpl(const egl::DisplayState &state)
        : mState(state), mExtensionsInitialized(false), mCapsInitialized(false)
    {
    }
    
    DisplayImpl::~DisplayImpl()
    {
        ASSERT(mState.surfaceSet.empty());
    }
    
    const egl::DisplayExtensions &DisplayImpl::getExtensions() const
    {
        if (!mExtensionsInitialized)
        {
            generateExtensions(&mExtensions);
            mExtensionsInitialized = true;
        }
    
        return mExtensions;
    }
    
    egl::Error DisplayImpl::validateClientBuffer(const egl::Config *configuration,
                                                 EGLenum buftype,
                                                 EGLClientBuffer clientBuffer,
                                                 const egl::AttributeMap &attribs) const
    {
        UNREACHABLE();
        return egl::Error(EGL_BAD_DISPLAY, "DisplayImpl::validateClientBuffer unimplemented.");
    }
    
    const egl::Caps &DisplayImpl::getCaps() const
    {
        if (!mCapsInitialized)
        {
            generateCaps(&mCaps);
            mCapsInitialized = true;
        }
    
        return mCaps;
    }
    
    }  // namespace rx