Debian Codegraph @

tools/glslminifier/src/GlslMinify.h

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 /*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <string>
18
19 #ifndef TNT_GLSLMINIFY_H
20 #define TNT_GLSLMINIFY_H
21
22 namespace glslminifier {
23
24 enum GlslMinifyOptions : uint32_t {
25 NONE = 0x0,
26
27 // Remove comments, both slash-slash (//) and slash-asterisk (/**/)
28 STRIP_COMMENTS = 0x1,
29
30 // Removes empty lines (two or more consecutive newlines are turned into one).
31 STRIP_EMPTY_LINES = 0x2,
32
33 // Removes indentation.
34 STRIP_INDENTATION = 0x4,
35
36 ALL = 0xFFFFFFFF
37 };
38
39 std::string minifyGlsl(const std::string& glsl,
40 GlslMinifyOptions options = GlslMinifyOptions::ALL) noexcept;
41
42 } // namespace glslminifier
43
44 #endif //TNT_GLSLMINIFY_H