Hash :
0f566fc7
Author :
Date :
2019-03-20T11:36:29
Introduce ConfigParameters test helper struct. This allows us to more easily compare sets of parameters used in our tests. The config parameters are stuff like the red / gree / blue bits used in an EGL config. Or particular sets of extensions or other EGL options. This will more easily allow us to determine when we need to use a new EGL display instead of reusing a prior. Bug: angleproject:3261 Change-Id: Ia1f0ede988e0b4084fbb4d55097e94fd89ee4899 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
//
// Copyright 2018 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.
//
// WGLWindow:
// Implements initializing a WGL rendering context.
//
#ifndef UTIL_WINDOWS_WGLWINDOW_H_
#define UTIL_WINDOWS_WGLWINDOW_H_
#include "common/angleutils.h"
#include "export.h"
#include "util/EGLWindow.h"
class OSWindow;
namespace angle
{
class Library;
} // namespace angle
class ANGLE_UTIL_EXPORT WGLWindow : public GLWindowBase
{
public:
static WGLWindow *New(int glesMajorVersion, int glesMinorVersion);
static void Delete(WGLWindow **window);
// Internally initializes GL resources.
bool initializeGL(OSWindow *osWindow,
angle::Library *glWindowingLibrary,
const ConfigParameters ¶ms) override;
void destroyGL() override;
bool isGLInitialized() const override;
void makeCurrent() override;
void swap() override;
bool hasError() const override;
private:
WGLWindow(int glesMajorVersion, int glesMinorVersion);
~WGLWindow() override;
// OS resources.
HDC mDeviceContext;
HGLRC mWGLContext;
HWND mWindow;
};
#endif // UTIL_WINDOWS_WGLWINDOW_H_