Line data Source code
1 : /*
2 : * Copyright 2016 Google Inc.
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 "SkSLUtil.h"
9 :
10 : #ifndef __STDC_FORMAT_MACROS
11 : #define __STDC_FORMAT_MACROS
12 : #endif
13 :
14 : namespace SkSL {
15 :
16 : #ifdef SKSL_STANDALONE
17 : StandaloneShaderCaps standaloneCaps;
18 : #endif
19 :
20 0 : void sksl_abort() {
21 : #ifdef SKSL_STANDALONE
22 : abort();
23 : #else
24 0 : sk_abort_no_print();
25 0 : exit(1);
26 : #endif
27 : }
28 :
29 0 : void write_stringstream(const StringStream& s, OutputStream& out) {
30 0 : out.write(s.data(), s.size());
31 0 : }
32 :
33 : } // namespace
|