blob: 88ecc0f5a3c9d56bcec3271dbc2b24740242b851 [file] [log] [blame]
John Stiles54e7c052021-01-11 14:22:36 -05001/*
2 * Copyright 2021 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "src/sksl/SkSLContext.h"
John Stiles2dda4b62021-09-16 13:18:10 -04009#include "src/sksl/SkSLPool.h"
Ethan Nicholas4a5e22a2021-08-13 17:29:51 -040010
John Stiles54e7c052021-01-11 14:22:36 -050011namespace SkSL {
12
John Stiles2dda4b62021-09-16 13:18:10 -040013Context::Context(ErrorReporter& errors, const ShaderCapsClass& caps, Mangler& mangler)
Ethan Nicholas8d116542021-08-11 13:27:16 -040014 : fCaps(caps)
John Stiles2dda4b62021-09-16 13:18:10 -040015 , fErrors(&errors)
16 , fMangler(&mangler) {
17 SkASSERT(!Pool::IsAttached());
18}
19
20Context::~Context() {
Ethan Nicholas624a5292021-04-16 14:54:43 -040021 SkASSERT(!Pool::IsAttached());
22}
John Stiles91216672021-04-27 17:38:44 -040023
John Stiles54e7c052021-01-11 14:22:36 -050024} // namespace SkSL
25