blob: 80c044a9011fc13ba090c7ff56eec718a94082a6 [file] [log] [blame]
Jamie Madill870352a2014-12-01 11:01:17 -05001//
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
Jamie Madill3311d472017-01-02 17:55:02 -050011#include "libANGLE/Display.h"
Jamie Madill870352a2014-12-01 11:01:17 -050012#include "libANGLE/Surface.h"
13
14namespace rx
15{
16
Jamie Madill3311d472017-01-02 17:55:02 -050017DisplayImpl::DisplayImpl(const egl::DisplayState &state)
Shahbaz Youssefi996628a2018-09-24 16:39:26 -040018 : mState(state), mExtensionsInitialized(false), mCapsInitialized(false), mBlobCache(nullptr)
Geoff Lang1b765452014-12-11 11:58:39 -050019{
20}
21
Jamie Madill870352a2014-12-01 11:01:17 -050022DisplayImpl::~DisplayImpl()
23{
Jamie Madill3311d472017-01-02 17:55:02 -050024 ASSERT(mState.surfaceSet.empty());
Jamie Madill870352a2014-12-01 11:01:17 -050025}
26
Geoff Lang1b765452014-12-11 11:58:39 -050027const egl::DisplayExtensions &DisplayImpl::getExtensions() const
28{
29 if (!mExtensionsInitialized)
30 {
31 generateExtensions(&mExtensions);
32 mExtensionsInitialized = true;
33 }
34
35 return mExtensions;
36}
37
Geoff Lang2018c0b2015-12-08 11:48:51 -050038egl::Error DisplayImpl::validateClientBuffer(const egl::Config *configuration,
39 EGLenum buftype,
40 EGLClientBuffer clientBuffer,
41 const egl::AttributeMap &attribs) const
42{
43 UNREACHABLE();
Yuly Novikovc4d18aa2017-03-09 18:45:02 -050044 return egl::EglBadDisplay() << "DisplayImpl::validateClientBuffer unimplemented.";
Geoff Lang2018c0b2015-12-08 11:48:51 -050045}
46
Geoff Lang5c39f682015-01-06 15:19:35 -050047const egl::Caps &DisplayImpl::getCaps() const
48{
49 if (!mCapsInitialized)
50 {
51 generateCaps(&mCaps);
52 mCapsInitialized = true;
53 }
54
55 return mCaps;
56}
57
Jamie Madill70ee0f62017-02-06 16:04:20 -050058} // namespace rx