blob: 83f04b5a0b54525e51f777f6de34bd80a9c5e967 [file] [log] [blame]
Jamie Madill1e9ae072014-11-06 15:27:21 -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// Data.cpp: Container class for all GL relevant state, caps and objects
8
Geoff Lang2b5420c2014-11-19 14:20:15 -05009#include "libANGLE/Data.h"
10#include "libANGLE/ResourceManager.h"
Jamie Madill1e9ae072014-11-06 15:27:21 -050011
12namespace gl
13{
14
Geoff Langf0aa8422015-09-29 15:08:34 -040015Data::Data(uintptr_t contextIn,
16 GLint clientVersionIn,
17 const State &stateIn,
18 const Caps &capsIn,
19 const TextureCapsMap &textureCapsIn,
20 const Extensions &extensionsIn,
Jamie Madillf25855c2015-11-03 11:06:18 -050021 const ResourceManager *resourceManagerIn,
22 const Limitations &limitationsIn)
Geoff Langf0aa8422015-09-29 15:08:34 -040023 : context(contextIn),
24 clientVersion(clientVersionIn),
Jamie Madill1e9ae072014-11-06 15:27:21 -050025 state(&stateIn),
26 caps(&capsIn),
27 textureCaps(&textureCapsIn),
28 extensions(&extensionsIn),
Jamie Madillf25855c2015-11-03 11:06:18 -050029 resourceManager(resourceManagerIn),
30 limitations(&limitationsIn)
Jamie Madill1e9ae072014-11-06 15:27:21 -050031{}
32
33Data::~Data()
34{
35}
36
Jamie Madillf25855c2015-11-03 11:06:18 -050037ValidationContext::ValidationContext(GLint clientVersion,
38 const State &state,
39 const Caps &caps,
40 const TextureCapsMap &textureCaps,
41 const Extensions &extensions,
42 const ResourceManager *resourceManager,
Jamie Madill46e6c7a2016-01-18 14:42:30 -050043 const Limitations &limitations,
44 bool skipValidation)
Jamie Madillf25855c2015-11-03 11:06:18 -050045 : mData(reinterpret_cast<uintptr_t>(this),
46 clientVersion,
47 state,
48 caps,
49 textureCaps,
50 extensions,
51 resourceManager,
Jamie Madill46e6c7a2016-01-18 14:42:30 -050052 limitations),
53 mSkipValidation(skipValidation)
Jamie Madillf25855c2015-11-03 11:06:18 -050054{
55}
Jamie Madill46e6c7a2016-01-18 14:42:30 -050056} // namespace gl