Add a proper license to webgpu.h's template.

This avoids linter checks to trigger when importing updates of Dawn into
Google3.

Bug:
Change-Id: Ib038d8937cc6c294823b56d52b6f2c5e5e24ffac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15140
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-01-15 15:39:12 +00:00
committed by Commit Bot service account
parent 9af58bbe14
commit 1bf3167ce6
2 changed files with 26 additions and 0 deletions

View File

@@ -117,6 +117,11 @@ class _PreprocessingLoader(jinja2.BaseLoader):
result = []
indentation_level = 0
# Filter lines that are pure comments. line_comment_prefix is not enough because it removes
# the comment but doesn't completely remove the line, resulting in more verbose output.
lines = filter(lambda line: not line.strip().startswith('//*'), lines)
# Remove indentation templates have for the Jinja control flow.
for line in lines:
# The capture in the regex adds one element per block start or end so we divide by two
# there is also an extra line chunk corresponding to the line end, so we substract it.