1 //
2 // Copyright 2018 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 #include "libANGLE/renderer/gl/wgl/RendererWGL.h"
8
9 #include "libANGLE/renderer/gl/wgl/DisplayWGL.h"
10
11 namespace rx
12 {
13
RendererWGL(std::unique_ptr<FunctionsGL> functionsGL,const egl::AttributeMap & attribMap,DisplayWGL * display,HGLRC context)14 RendererWGL::RendererWGL(std::unique_ptr<FunctionsGL> functionsGL,
15 const egl::AttributeMap &attribMap,
16 DisplayWGL *display,
17 HGLRC context)
18 : RendererGL(std::move(functionsGL), attribMap, display), mDisplay(display), mContext(context)
19 {}
20
~RendererWGL()21 RendererWGL::~RendererWGL()
22 {
23 mDisplay->destroyNativeContext(mContext);
24 mContext = nullptr;
25 }
26
getContext() const27 HGLRC RendererWGL::getContext() const
28 {
29 return mContext;
30 }
31
32 } // namespace rx
33