Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 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 | // Data.cpp: Container class for all GL relevant state, caps and objects |
| 8 | |
Jamie Madill | 9082b98 | 2016-04-27 15:21:51 -0400 | [diff] [blame^] | 9 | #include "libANGLE/ContextState.h" |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 10 | #include "libANGLE/ResourceManager.h" |
Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 11 | |
| 12 | namespace gl |
| 13 | { |
| 14 | |
Jamie Madill | 9082b98 | 2016-04-27 15:21:51 -0400 | [diff] [blame^] | 15 | ContextState::ContextState(uintptr_t contextIn, |
| 16 | GLint clientVersionIn, |
| 17 | const State &stateIn, |
| 18 | const Caps &capsIn, |
| 19 | const TextureCapsMap &textureCapsIn, |
| 20 | const Extensions &extensionsIn, |
| 21 | const ResourceManager *resourceManagerIn, |
| 22 | const Limitations &limitationsIn) |
Geoff Lang | f0aa842 | 2015-09-29 15:08:34 -0400 | [diff] [blame] | 23 | : context(contextIn), |
| 24 | clientVersion(clientVersionIn), |
Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 25 | state(&stateIn), |
| 26 | caps(&capsIn), |
| 27 | textureCaps(&textureCapsIn), |
| 28 | extensions(&extensionsIn), |
Jamie Madill | f25855c | 2015-11-03 11:06:18 -0500 | [diff] [blame] | 29 | resourceManager(resourceManagerIn), |
| 30 | limitations(&limitationsIn) |
Jamie Madill | 9082b98 | 2016-04-27 15:21:51 -0400 | [diff] [blame^] | 31 | { |
| 32 | } |
Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 33 | |
Jamie Madill | 9082b98 | 2016-04-27 15:21:51 -0400 | [diff] [blame^] | 34 | ContextState::~ContextState() |
Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 35 | { |
| 36 | } |
| 37 | |
Jamie Madill | f25855c | 2015-11-03 11:06:18 -0500 | [diff] [blame] | 38 | ValidationContext::ValidationContext(GLint clientVersion, |
| 39 | const State &state, |
| 40 | const Caps &caps, |
| 41 | const TextureCapsMap &textureCaps, |
| 42 | const Extensions &extensions, |
| 43 | const ResourceManager *resourceManager, |
Jamie Madill | 46e6c7a | 2016-01-18 14:42:30 -0500 | [diff] [blame] | 44 | const Limitations &limitations, |
| 45 | bool skipValidation) |
Jamie Madill | f25855c | 2015-11-03 11:06:18 -0500 | [diff] [blame] | 46 | : mData(reinterpret_cast<uintptr_t>(this), |
| 47 | clientVersion, |
| 48 | state, |
| 49 | caps, |
| 50 | textureCaps, |
| 51 | extensions, |
| 52 | resourceManager, |
Jamie Madill | 46e6c7a | 2016-01-18 14:42:30 -0500 | [diff] [blame] | 53 | limitations), |
| 54 | mSkipValidation(skipValidation) |
Jamie Madill | f25855c | 2015-11-03 11:06:18 -0500 | [diff] [blame] | 55 | { |
| 56 | } |
Jamie Madill | 46e6c7a | 2016-01-18 14:42:30 -0500 | [diff] [blame] | 57 | } // namespace gl |