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 | |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 9 | #include "libANGLE/Data.h" |
| 10 | #include "libANGLE/ResourceManager.h" |
Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 11 | |
| 12 | namespace gl |
| 13 | { |
| 14 | |
Geoff Lang | f0aa842 | 2015-09-29 15:08:34 -0400 | [diff] [blame] | 15 | Data::Data(uintptr_t contextIn, |
| 16 | GLint clientVersionIn, |
| 17 | const State &stateIn, |
| 18 | const Caps &capsIn, |
| 19 | const TextureCapsMap &textureCapsIn, |
| 20 | const Extensions &extensionsIn, |
Jamie Madill | f25855c | 2015-11-03 11:06:18 -0500 | [diff] [blame^] | 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 | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 31 | {} |
| 32 | |
| 33 | Data::~Data() |
| 34 | { |
| 35 | } |
| 36 | |
Jamie Madill | f25855c | 2015-11-03 11:06:18 -0500 | [diff] [blame^] | 37 | ValidationContext::ValidationContext(GLint clientVersion, |
| 38 | const State &state, |
| 39 | const Caps &caps, |
| 40 | const TextureCapsMap &textureCaps, |
| 41 | const Extensions &extensions, |
| 42 | const ResourceManager *resourceManager, |
| 43 | const Limitations &limitations) |
| 44 | : mData(reinterpret_cast<uintptr_t>(this), |
| 45 | clientVersion, |
| 46 | state, |
| 47 | caps, |
| 48 | textureCaps, |
| 49 | extensions, |
| 50 | resourceManager, |
| 51 | limitations) |
| 52 | { |
| 53 | } |
Jamie Madill | 1e9ae07 | 2014-11-06 15:27:21 -0500 | [diff] [blame] | 54 | } |