1 // 2 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 // DisplayImpl.cpp: Implementation methods of egl::Display 8 9 #include "libANGLE/renderer/DisplayImpl.h" 10 11 #include "libANGLE/Display.h" 12 #include "libANGLE/Surface.h" 13 14 namespace rx 15 { 16 DisplayImpl(const egl::DisplayState & state)17DisplayImpl::DisplayImpl(const egl::DisplayState &state) 18 : mState(state), mExtensionsInitialized(false), mCapsInitialized(false) 19 { 20 } 21 ~DisplayImpl()22DisplayImpl::~DisplayImpl() 23 { 24 ASSERT(mState.surfaceSet.empty()); 25 } 26 getExtensions() const27const egl::DisplayExtensions &DisplayImpl::getExtensions() const 28 { 29 if (!mExtensionsInitialized) 30 { 31 generateExtensions(&mExtensions); 32 mExtensionsInitialized = true; 33 } 34 35 return mExtensions; 36 } 37 validateClientBuffer(const egl::Config * configuration,EGLenum buftype,EGLClientBuffer clientBuffer,const egl::AttributeMap & attribs) const38egl::Error DisplayImpl::validateClientBuffer(const egl::Config *configuration, 39 EGLenum buftype, 40 EGLClientBuffer clientBuffer, 41 const egl::AttributeMap &attribs) const 42 { 43 UNREACHABLE(); 44 return egl::EglBadDisplay() << "DisplayImpl::validateClientBuffer unimplemented."; 45 } 46 getCaps() const47const egl::Caps &DisplayImpl::getCaps() const 48 { 49 if (!mCapsInitialized) 50 { 51 generateCaps(&mCaps); 52 mCapsInitialized = true; 53 } 54 55 return mCaps; 56 } 57 58 } // namespace rx 59