diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2018-07-24 14:59:08 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-24 14:59:16 +0000 |
commit | 734b2a859784af0b16dbbe07570e6d2f5da34e76 (patch) | |
tree | 2db0312b082f5add2a261011f6ea881438b6dd78 /src/sksl/SkSLLayoutLexer.h | |
parent | 81ecdbb7ff36afef9091c1b524baafe67381e70d (diff) |
Revert "removed SkSLLayoutLexer"
This reverts commit 804f81786148cd3a4385d10ab7a31340fa47b10d.
Reason for revert: breaking chrome roll: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8940111858576531488/+/steps/compile__with_patch_/0/stdout
Original change's description:
> removed SkSLLayoutLexer
>
> Bug: skia:
> Change-Id: Iad4c89fbde8bc1f6c3d022af9aec2ec5faa8a4ef
> Reviewed-on: https://skia-review.googlesource.com/142583
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=mtklein@google.com,ethannicholas@google.com
Change-Id: Ie07065ac43c5b8356665a7170adbe97ae8fd9f90
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/143120
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLLayoutLexer.h')
-rw-r--r-- | src/sksl/SkSLLayoutLexer.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/src/sksl/SkSLLayoutLexer.h b/src/sksl/SkSLLayoutLexer.h new file mode 100644 index 0000000000..e95f20e06c --- /dev/null +++ b/src/sksl/SkSLLayoutLexer.h @@ -0,0 +1,127 @@ +/* + * Copyright 2017 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +/***************************************************************************************** + ******************** This file was generated by sksllex. Do not edit. ******************* + *****************************************************************************************/ +#ifndef SKSL_LayoutLexer +#define SKSL_LayoutLexer +#include <cstddef> +#include <cstdint> +namespace SkSL { + +struct LayoutToken { + enum Kind { +#undef END_OF_FILE + END_OF_FILE, +#undef LOCATION + LOCATION, +#undef OFFSET + OFFSET, +#undef BINDING + BINDING, +#undef INDEX + INDEX, +#undef SET + SET, +#undef BUILTIN + BUILTIN, +#undef INPUT_ATTACHMENT_INDEX + INPUT_ATTACHMENT_INDEX, +#undef ORIGIN_UPPER_LEFT + ORIGIN_UPPER_LEFT, +#undef OVERRIDE_COVERAGE + OVERRIDE_COVERAGE, +#undef BLEND_SUPPORT_ALL_EQUATIONS + BLEND_SUPPORT_ALL_EQUATIONS, +#undef BLEND_SUPPORT_MULTIPLY + BLEND_SUPPORT_MULTIPLY, +#undef BLEND_SUPPORT_SCREEN + BLEND_SUPPORT_SCREEN, +#undef BLEND_SUPPORT_OVERLAY + BLEND_SUPPORT_OVERLAY, +#undef BLEND_SUPPORT_DARKEN + BLEND_SUPPORT_DARKEN, +#undef BLEND_SUPPORT_LIGHTEN + BLEND_SUPPORT_LIGHTEN, +#undef BLEND_SUPPORT_COLORDODGE + BLEND_SUPPORT_COLORDODGE, +#undef BLEND_SUPPORT_COLORBURN + BLEND_SUPPORT_COLORBURN, +#undef BLEND_SUPPORT_HARDLIGHT + BLEND_SUPPORT_HARDLIGHT, +#undef BLEND_SUPPORT_SOFTLIGHT + BLEND_SUPPORT_SOFTLIGHT, +#undef BLEND_SUPPORT_DIFFERENCE + BLEND_SUPPORT_DIFFERENCE, +#undef BLEND_SUPPORT_EXCLUSION + BLEND_SUPPORT_EXCLUSION, +#undef BLEND_SUPPORT_HSL_HUE + BLEND_SUPPORT_HSL_HUE, +#undef BLEND_SUPPORT_HSL_SATURATION + BLEND_SUPPORT_HSL_SATURATION, +#undef BLEND_SUPPORT_HSL_COLOR + BLEND_SUPPORT_HSL_COLOR, +#undef BLEND_SUPPORT_HSL_LUMINOSITY + BLEND_SUPPORT_HSL_LUMINOSITY, +#undef PUSH_CONSTANT + PUSH_CONSTANT, +#undef POINTS + POINTS, +#undef LINES + LINES, +#undef LINE_STRIP + LINE_STRIP, +#undef LINES_ADJACENCY + LINES_ADJACENCY, +#undef TRIANGLES + TRIANGLES, +#undef TRIANGLE_STRIP + TRIANGLE_STRIP, +#undef TRIANGLES_ADJACENCY + TRIANGLES_ADJACENCY, +#undef MAX_VERTICES + MAX_VERTICES, +#undef INVOCATIONS + INVOCATIONS, +#undef WHEN + WHEN, +#undef KEY + KEY, +#undef CTYPE + CTYPE, +#undef INVALID + INVALID, + }; + + LayoutToken() : fKind(Kind::INVALID), fOffset(-1), fLength(-1) {} + + LayoutToken(Kind kind, int offset, int length) + : fKind(kind), fOffset(offset), fLength(length) {} + + Kind fKind; + int fOffset; + int fLength; +}; + +class LayoutLexer { +public: + void start(const char* text, size_t length) { + fText = text; + fLength = length; + fOffset = 0; + } + + LayoutToken next(); + +private: + const char* fText; + int fLength; + int fOffset; +}; + +} // namespace SkSL +#endif |