Edit

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

Branch :

  • Show log

    Commit

  • Author : Yuly Novikov
    Date : 2017-03-09 18:45:02
    Hash : c4d18aac
    Message : Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@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::EglBadDisplay() << "DisplayImpl::validateClientBuffer unimplemented.";
    }
    
    const egl::Caps &DisplayImpl::getCaps() const
    {
        if (!mCapsInitialized)
        {
            generateCaps(&mCaps);
            mCapsInitialized = true;
        }
    
        return mCaps;
    }
    
    }  // namespace rx