hexsha
stringlengths
40
40
repo
stringlengths
7
114
path
stringlengths
4
124
license
listlengths
1
9
language
stringclasses
1 value
identifier
stringlengths
1
71
return_type
stringlengths
1
749
original_string
stringlengths
76
22.7k
original_docstring
stringlengths
16
7.61k
docstring
stringlengths
16
2.47k
docstring_tokens
listlengths
6
477
code
stringlengths
14
10.2k
code_tokens
listlengths
6
996
short_docstring
stringlengths
2
644
short_docstring_tokens
listlengths
1
116
comment
listlengths
1
89
parameters
listlengths
0
64
docstring_params
dict
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_parse_asn1_element
<not_specific>
def _parse_asn1_element(der_bytes): """Parses a DER-encoded tag/Length/Value into its component parts Args: der_bytes: A DER-encoded ASN.1 data type Returns: A tuple of the ASN.1 tag value, the length of the ASN.1 header that was read, the sequence of bytes for the value, and then any data from der_...
Parses a DER-encoded tag/Length/Value into its component parts Args: der_bytes: A DER-encoded ASN.1 data type Returns: A tuple of the ASN.1 tag value, the length of the ASN.1 header that was read, the sequence of bytes for the value, and then any data from der_bytes that was not part of the tag/Le...
Parses a DER-encoded tag/Length/Value into its component parts
[ "Parses", "a", "DER", "-", "encoded", "tag", "/", "Length", "/", "Value", "into", "its", "component", "parts" ]
def _parse_asn1_element(der_bytes): tag = six.indexbytes(der_bytes, 0) length = six.indexbytes(der_bytes, 1) header_length = 2 if length & 0x80: num_length_bytes = length & 0x7f length = 0 for i in range(2, 2 + num_length_bytes): length <<= 8 length += six.indexbytes(der_bytes, i) he...
[ "def", "_parse_asn1_element", "(", "der_bytes", ")", ":", "tag", "=", "six", ".", "indexbytes", "(", "der_bytes", ",", "0", ")", "length", "=", "six", ".", "indexbytes", "(", "der_bytes", ",", "1", ")", "header_length", "=", "2", "if", "length", "&", "...
Parses a DER-encoded tag/Length/Value into its component parts
[ "Parses", "a", "DER", "-", "encoded", "tag", "/", "Length", "/", "Value", "into", "its", "component", "parts" ]
[ "\"\"\"Parses a DER-encoded tag/Length/Value into its component parts\n\n Args:\n der_bytes: A DER-encoded ASN.1 data type\n\n Returns:\n A tuple of the ASN.1 tag value, the length of the ASN.1 header that was\n read, the sequence of bytes for the value, and then any data from der_bytes\n that was not...
[ { "param": "der_bytes", "type": null } ]
{ "returns": [ { "docstring": "A tuple of the ASN.1 tag value, the length of the ASN.1 header that was\nread, the sequence of bytes for the value, and then any data from der_bytes\nthat was not part of the tag/Length/Value.", "docstring_tokens": [ "A", "tuple", "of", "t...
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_der_cert_to_spki
<not_specific>
def _der_cert_to_spki(der_bytes): """Returns the subjectPublicKeyInfo of a DER-encoded certificate Args: der_bytes: A DER-encoded certificate (RFC 5280) Returns: A byte array containing the subjectPublicKeyInfo """ iterator = ASN1Iterator(der_bytes) iterator.step_into() # enter certificate struct...
Returns the subjectPublicKeyInfo of a DER-encoded certificate Args: der_bytes: A DER-encoded certificate (RFC 5280) Returns: A byte array containing the subjectPublicKeyInfo
Returns the subjectPublicKeyInfo of a DER-encoded certificate
[ "Returns", "the", "subjectPublicKeyInfo", "of", "a", "DER", "-", "encoded", "certificate" ]
def _der_cert_to_spki(der_bytes): iterator = ASN1Iterator(der_bytes) iterator.step_into() iterator.step_into() iterator.step_over() iterator.step_over() iterator.step_over() iterator.step_over() iterator.step_over() iterator.step_over() return iterator.contents()
[ "def", "_der_cert_to_spki", "(", "der_bytes", ")", ":", "iterator", "=", "ASN1Iterator", "(", "der_bytes", ")", "iterator", ".", "step_into", "(", ")", "iterator", ".", "step_into", "(", ")", "iterator", ".", "step_over", "(", ")", "iterator", ".", "step_ove...
Returns the subjectPublicKeyInfo of a DER-encoded certificate
[ "Returns", "the", "subjectPublicKeyInfo", "of", "a", "DER", "-", "encoded", "certificate" ]
[ "\"\"\"Returns the subjectPublicKeyInfo of a DER-encoded certificate\n\n Args:\n der_bytes: A DER-encoded certificate (RFC 5280)\n\n Returns:\n A byte array containing the subjectPublicKeyInfo\n \"\"\"", "# enter certificate structure", "# enter TBSCertificate", "# over version", "# over serial", ...
[ { "param": "der_bytes", "type": null } ]
{ "returns": [ { "docstring": "A byte array containing the subjectPublicKeyInfo", "docstring_tokens": [ "A", "byte", "array", "containing", "the", "subjectPublicKeyInfo" ], "type": null } ], "raises": [], "params": [ { "id...
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
der_cert_to_spki_hash
<not_specific>
def der_cert_to_spki_hash(der_cert): """Gets the SHA-256 hash of the subjectPublicKeyInfo of a DER encoded cert Args: der_cert: A string containing the DER-encoded certificate Returns: The SHA-256 hash of the certificate, as a byte sequence """ return hashlib.sha256(_der_cert_to_spki(der_cert)).dige...
Gets the SHA-256 hash of the subjectPublicKeyInfo of a DER encoded cert Args: der_cert: A string containing the DER-encoded certificate Returns: The SHA-256 hash of the certificate, as a byte sequence
Gets the SHA-256 hash of the subjectPublicKeyInfo of a DER encoded cert
[ "Gets", "the", "SHA", "-", "256", "hash", "of", "the", "subjectPublicKeyInfo", "of", "a", "DER", "encoded", "cert" ]
def der_cert_to_spki_hash(der_cert): return hashlib.sha256(_der_cert_to_spki(der_cert)).digest()
[ "def", "der_cert_to_spki_hash", "(", "der_cert", ")", ":", "return", "hashlib", ".", "sha256", "(", "_der_cert_to_spki", "(", "der_cert", ")", ")", ".", "digest", "(", ")" ]
Gets the SHA-256 hash of the subjectPublicKeyInfo of a DER encoded cert
[ "Gets", "the", "SHA", "-", "256", "hash", "of", "the", "subjectPublicKeyInfo", "of", "a", "DER", "encoded", "cert" ]
[ "\"\"\"Gets the SHA-256 hash of the subjectPublicKeyInfo of a DER encoded cert\n\n Args:\n der_cert: A string containing the DER-encoded certificate\n\n Returns:\n The SHA-256 hash of the certificate, as a byte sequence\n \"\"\"" ]
[ { "param": "der_cert", "type": null } ]
{ "returns": [ { "docstring": "The SHA-256 hash of the certificate, as a byte sequence", "docstring_tokens": [ "The", "SHA", "-", "256", "hash", "of", "the", "certificate", "as", "a", "byte", "sequence" ...
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
pem_cert_file_to_spki_hash
<not_specific>
def pem_cert_file_to_spki_hash(pem_filename): """Gets the SHA-256 hash of the subjectPublicKeyInfo of a cert in a file Args: pem_filename: A file containing a PEM-encoded certificate. Returns: The SHA-256 hash of the first certificate in the file, as a byte sequence """ return der_cert_to_spki_hash(...
Gets the SHA-256 hash of the subjectPublicKeyInfo of a cert in a file Args: pem_filename: A file containing a PEM-encoded certificate. Returns: The SHA-256 hash of the first certificate in the file, as a byte sequence
Gets the SHA-256 hash of the subjectPublicKeyInfo of a cert in a file
[ "Gets", "the", "SHA", "-", "256", "hash", "of", "the", "subjectPublicKeyInfo", "of", "a", "cert", "in", "a", "file" ]
def pem_cert_file_to_spki_hash(pem_filename): return der_cert_to_spki_hash(_pem_cert_to_binary(pem_filename))
[ "def", "pem_cert_file_to_spki_hash", "(", "pem_filename", ")", ":", "return", "der_cert_to_spki_hash", "(", "_pem_cert_to_binary", "(", "pem_filename", ")", ")" ]
Gets the SHA-256 hash of the subjectPublicKeyInfo of a cert in a file
[ "Gets", "the", "SHA", "-", "256", "hash", "of", "the", "subjectPublicKeyInfo", "of", "a", "cert", "in", "a", "file" ]
[ "\"\"\"Gets the SHA-256 hash of the subjectPublicKeyInfo of a cert in a file\n\n Args:\n pem_filename: A file containing a PEM-encoded certificate.\n\n Returns:\n The SHA-256 hash of the first certificate in the file, as a byte sequence\n \"\"\"" ]
[ { "param": "pem_filename", "type": null } ]
{ "returns": [ { "docstring": "The SHA-256 hash of the first certificate in the file, as a byte sequence", "docstring_tokens": [ "The", "SHA", "-", "256", "hash", "of", "the", "first", "certificate", "in", "the", ...
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
der_cert_to_subject_hash
<not_specific>
def der_cert_to_subject_hash(der_bytes): """Returns SHA256(subject) of a DER-encoded certificate Args: der_bytes: A DER-encoded certificate (RFC 5280) Returns: The SHA-256 hash of the certificate's subject. """ iterator = ASN1Iterator(der_bytes) iterator.step_into() # enter certificate structure ...
Returns SHA256(subject) of a DER-encoded certificate Args: der_bytes: A DER-encoded certificate (RFC 5280) Returns: The SHA-256 hash of the certificate's subject.
Returns SHA256(subject) of a DER-encoded certificate
[ "Returns", "SHA256", "(", "subject", ")", "of", "a", "DER", "-", "encoded", "certificate" ]
def der_cert_to_subject_hash(der_bytes): iterator = ASN1Iterator(der_bytes) iterator.step_into() iterator.step_into() iterator.step_over() iterator.step_over() iterator.step_over() iterator.step_over() iterator.step_over() return hashlib.sha256(iterator.contents()).digest()
[ "def", "der_cert_to_subject_hash", "(", "der_bytes", ")", ":", "iterator", "=", "ASN1Iterator", "(", "der_bytes", ")", "iterator", ".", "step_into", "(", ")", "iterator", ".", "step_into", "(", ")", "iterator", ".", "step_over", "(", ")", "iterator", ".", "s...
Returns SHA256(subject) of a DER-encoded certificate
[ "Returns", "SHA256", "(", "subject", ")", "of", "a", "DER", "-", "encoded", "certificate" ]
[ "\"\"\"Returns SHA256(subject) of a DER-encoded certificate\n\n Args:\n der_bytes: A DER-encoded certificate (RFC 5280)\n\n Returns:\n The SHA-256 hash of the certificate's subject.\n \"\"\"", "# enter certificate structure", "# enter TBSCertificate", "# over version", "# over serial", "# over si...
[ { "param": "der_bytes", "type": null } ]
{ "returns": [ { "docstring": "The SHA-256 hash of the certificate's subject.", "docstring_tokens": [ "The", "SHA", "-", "256", "hash", "of", "the", "certificate", "'", "s", "subject", "." ], "t...
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
pem_cert_file_to_subject_hash
<not_specific>
def pem_cert_file_to_subject_hash(pem_filename): """Gets the SHA-256 hash of the subject of a cert in a file Args: pem_filename: A file containing a PEM-encoded certificate. Returns: The SHA-256 hash of the subject of the first certificate in the file, as a byte sequence """ return der_cert_to_s...
Gets the SHA-256 hash of the subject of a cert in a file Args: pem_filename: A file containing a PEM-encoded certificate. Returns: The SHA-256 hash of the subject of the first certificate in the file, as a byte sequence
Gets the SHA-256 hash of the subject of a cert in a file
[ "Gets", "the", "SHA", "-", "256", "hash", "of", "the", "subject", "of", "a", "cert", "in", "a", "file" ]
def pem_cert_file_to_subject_hash(pem_filename): return der_cert_to_subject_hash(_pem_cert_to_binary(pem_filename))
[ "def", "pem_cert_file_to_subject_hash", "(", "pem_filename", ")", ":", "return", "der_cert_to_subject_hash", "(", "_pem_cert_to_binary", "(", "pem_filename", ")", ")" ]
Gets the SHA-256 hash of the subject of a cert in a file
[ "Gets", "the", "SHA", "-", "256", "hash", "of", "the", "subject", "of", "a", "cert", "in", "a", "file" ]
[ "\"\"\"Gets the SHA-256 hash of the subject of a cert in a file\n\n Args:\n pem_filename: A file containing a PEM-encoded certificate.\n\n Returns:\n The SHA-256 hash of the subject of the first certificate in the file, as a\n byte sequence\n \"\"\"" ]
[ { "param": "pem_filename", "type": null } ]
{ "returns": [ { "docstring": "The SHA-256 hash of the subject of the first certificate in the file, as a\nbyte sequence", "docstring_tokens": [ "The", "SHA", "-", "256", "hash", "of", "the", "subject", "of", "the", ...
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
der_cert_to_serial
<not_specific>
def der_cert_to_serial(der_bytes): """Gets the serial of a DER-encoded certificate, omitting leading 0x00 Args: der_bytes: A DER-encoded certificates (RFC 5280) Returns: The encoded serial number value (omitting tag and length), and omitting any leading 0x00 used to indicate it is a positive INTEGER...
Gets the serial of a DER-encoded certificate, omitting leading 0x00 Args: der_bytes: A DER-encoded certificates (RFC 5280) Returns: The encoded serial number value (omitting tag and length), and omitting any leading 0x00 used to indicate it is a positive INTEGER.
Gets the serial of a DER-encoded certificate, omitting leading 0x00
[ "Gets", "the", "serial", "of", "a", "DER", "-", "encoded", "certificate", "omitting", "leading", "0x00" ]
def der_cert_to_serial(der_bytes): iterator = ASN1Iterator(der_bytes) iterator.step_into() iterator.step_into() iterator.step_over() raw_serial = iterator.encoded_value() if six.indexbytes(raw_serial, 0) == 0x00 and len(raw_serial) > 1: raw_serial = raw_serial[1:] return raw_serial
[ "def", "der_cert_to_serial", "(", "der_bytes", ")", ":", "iterator", "=", "ASN1Iterator", "(", "der_bytes", ")", "iterator", ".", "step_into", "(", ")", "iterator", ".", "step_into", "(", ")", "iterator", ".", "step_over", "(", ")", "raw_serial", "=", "itera...
Gets the serial of a DER-encoded certificate, omitting leading 0x00
[ "Gets", "the", "serial", "of", "a", "DER", "-", "encoded", "certificate", "omitting", "leading", "0x00" ]
[ "\"\"\"Gets the serial of a DER-encoded certificate, omitting leading 0x00\n\n Args:\n der_bytes: A DER-encoded certificates (RFC 5280)\n\n Returns:\n The encoded serial number value (omitting tag and length), and omitting\n any leading 0x00 used to indicate it is a positive INTEGER.\n \"\"\"", "# ent...
[ { "param": "der_bytes", "type": null } ]
{ "returns": [ { "docstring": "The encoded serial number value (omitting tag and length), and omitting\nany leading 0x00 used to indicate it is a positive INTEGER.", "docstring_tokens": [ "The", "encoded", "serial", "number", "value", "(", "omitt...
bb334ff081208e14eab95aaa4c752fac2dd755a5
sunlongbo/chromium
net/data/ssl/scripts/crlsetutil.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
pem_cert_file_to_serial
<not_specific>
def pem_cert_file_to_serial(pem_filename): """Gets the DER-encoded serial of a cert in a file, omitting leading 0x00 Args: pem_filename: A file containing a PEM-encoded certificate. Returns: The DER-encoded serial as a byte sequence """ return der_cert_to_serial(_pem_cert_to_binary(pem_filename))
Gets the DER-encoded serial of a cert in a file, omitting leading 0x00 Args: pem_filename: A file containing a PEM-encoded certificate. Returns: The DER-encoded serial as a byte sequence
Gets the DER-encoded serial of a cert in a file, omitting leading 0x00
[ "Gets", "the", "DER", "-", "encoded", "serial", "of", "a", "cert", "in", "a", "file", "omitting", "leading", "0x00" ]
def pem_cert_file_to_serial(pem_filename): return der_cert_to_serial(_pem_cert_to_binary(pem_filename))
[ "def", "pem_cert_file_to_serial", "(", "pem_filename", ")", ":", "return", "der_cert_to_serial", "(", "_pem_cert_to_binary", "(", "pem_filename", ")", ")" ]
Gets the DER-encoded serial of a cert in a file, omitting leading 0x00
[ "Gets", "the", "DER", "-", "encoded", "serial", "of", "a", "cert", "in", "a", "file", "omitting", "leading", "0x00" ]
[ "\"\"\"Gets the DER-encoded serial of a cert in a file, omitting leading 0x00\n\n Args:\n pem_filename: A file containing a PEM-encoded certificate.\n\n Returns:\n The DER-encoded serial as a byte sequence\n \"\"\"" ]
[ { "param": "pem_filename", "type": null } ]
{ "returns": [ { "docstring": "The DER-encoded serial as a byte sequence", "docstring_tokens": [ "The", "DER", "-", "encoded", "serial", "as", "a", "byte", "sequence" ], "type": null } ], "raises": [], "param...
2405fd2491ad6a944ac6930d1d4da66d69a7dc2c
sunlongbo/chromium
testing/buildbot/scripts/upload_test_result_artifacts.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
upload_artifacts
<not_specific>
def upload_artifacts(data, artifact_root, dry_run, bucket): """Uploads artifacts to google storage. Args: * data: The test results data to upload. Assumed to include 'tests' and 'artifact_type_info' top level keys. * artifact_root: The local directory where artifact locations are relative to. ...
Uploads artifacts to google storage. Args: * data: The test results data to upload. Assumed to include 'tests' and 'artifact_type_info' top level keys. * artifact_root: The local directory where artifact locations are relative to. * dry_run: If true, this run is a test run, and no actual chan...
Uploads artifacts to google storage.
[ "Uploads", "artifacts", "to", "google", "storage", "." ]
def upload_artifacts(data, artifact_root, dry_run, bucket): local_data = copy.deepcopy(data) type_info = local_data['artifact_type_info'] gs_path = 'sha1' tests = get_tests(local_data['tests']) for test_obj in tests.values(): for artifact_name in test_obj.get('artifacts', {}): if artifact_name not i...
[ "def", "upload_artifacts", "(", "data", ",", "artifact_root", ",", "dry_run", ",", "bucket", ")", ":", "local_data", "=", "copy", ".", "deepcopy", "(", "data", ")", "type_info", "=", "local_data", "[", "'artifact_type_info'", "]", "gs_path", "=", "'sha1'", "...
Uploads artifacts to google storage.
[ "Uploads", "artifacts", "to", "google", "storage", "." ]
[ "\"\"\"Uploads artifacts to google storage.\n\n Args:\n * data: The test results data to upload. Assumed to include 'tests' and\n 'artifact_type_info' top level keys.\n * artifact_root: The local directory where artifact locations are relative\n to.\n * dry_run: If true, this run is a test run, ...
[ { "param": "data", "type": null }, { "param": "artifact_root", "type": null }, { "param": "dry_run", "type": null }, { "param": "bucket", "type": null } ]
{ "returns": [ { "docstring": "The test results data, with rewritten artifact locations.", "docstring_tokens": [ "The", "test", "results", "data", "with", "rewritten", "artifact", "locations", "." ], "type": null }...
feab07d2331ec423f449e277d5ea3f323a0fa1ab
sunlongbo/chromium
third_party/blink/renderer/bindings/scripts/bind_gen/path_manager.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
gen_path_to
<not_specific>
def gen_path_to(cls, path): """ Returns the absolute path of |path| that must be relative to the root directory of generated files. """ assert cls._is_initialized, cls._REQUIRE_INIT_MESSAGE return os.path.abspath(os.path.join(cls._root_gen_dir, path))
Returns the absolute path of |path| that must be relative to the root directory of generated files.
Returns the absolute path of |path| that must be relative to the root directory of generated files.
[ "Returns", "the", "absolute", "path", "of", "|path|", "that", "must", "be", "relative", "to", "the", "root", "directory", "of", "generated", "files", "." ]
def gen_path_to(cls, path): assert cls._is_initialized, cls._REQUIRE_INIT_MESSAGE return os.path.abspath(os.path.join(cls._root_gen_dir, path))
[ "def", "gen_path_to", "(", "cls", ",", "path", ")", ":", "assert", "cls", ".", "_is_initialized", ",", "cls", ".", "_REQUIRE_INIT_MESSAGE", "return", "os", ".", "path", ".", "abspath", "(", "os", ".", "path", ".", "join", "(", "cls", ".", "_root_gen_dir"...
Returns the absolute path of |path| that must be relative to the root directory of generated files.
[ "Returns", "the", "absolute", "path", "of", "|path|", "that", "must", "be", "relative", "to", "the", "root", "directory", "of", "generated", "files", "." ]
[ "\"\"\"\n Returns the absolute path of |path| that must be relative to the root\n directory of generated files.\n \"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "path", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "path", "type": null, "docstring": null, "docstring_tokens": []...
feab07d2331ec423f449e277d5ea3f323a0fa1ab
sunlongbo/chromium
third_party/blink/renderer/bindings/scripts/bind_gen/path_manager.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
src_path_to
<not_specific>
def src_path_to(cls, path): """ Returns the absolute path of |path| that must be relative to the project root directory. """ assert cls._is_initialized, cls._REQUIRE_INIT_MESSAGE return os.path.abspath(os.path.join(cls._root_src_dir, path))
Returns the absolute path of |path| that must be relative to the project root directory.
Returns the absolute path of |path| that must be relative to the project root directory.
[ "Returns", "the", "absolute", "path", "of", "|path|", "that", "must", "be", "relative", "to", "the", "project", "root", "directory", "." ]
def src_path_to(cls, path): assert cls._is_initialized, cls._REQUIRE_INIT_MESSAGE return os.path.abspath(os.path.join(cls._root_src_dir, path))
[ "def", "src_path_to", "(", "cls", ",", "path", ")", ":", "assert", "cls", ".", "_is_initialized", ",", "cls", ".", "_REQUIRE_INIT_MESSAGE", "return", "os", ".", "path", ".", "abspath", "(", "os", ".", "path", ".", "join", "(", "cls", ".", "_root_src_dir"...
Returns the absolute path of |path| that must be relative to the project root directory.
[ "Returns", "the", "absolute", "path", "of", "|path|", "that", "must", "be", "relative", "to", "the", "project", "root", "directory", "." ]
[ "\"\"\"\n Returns the absolute path of |path| that must be relative to the\n project root directory.\n \"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "path", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "path", "type": null, "docstring": null, "docstring_tokens": []...
aeb7cfff7a2a2a96e88129152c71089141974653
sunlongbo/chromium
tools/disable_tests/resultdb.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
rdb_rpc
dict
def rdb_rpc(method: str, request: dict) -> dict: """Call the given RPC method, with the given request. Args: method: The method to call. Must be within luci.resultdb.v1.ResultDB. request: The request, in dict format. Returns: The response from ResultDB, in dict format. """ if CANNED_RESPONSE_FI...
Call the given RPC method, with the given request. Args: method: The method to call. Must be within luci.resultdb.v1.ResultDB. request: The request, in dict format. Returns: The response from ResultDB, in dict format.
Call the given RPC method, with the given request.
[ "Call", "the", "given", "RPC", "method", "with", "the", "given", "request", "." ]
def rdb_rpc(method: str, request: dict) -> dict: if CANNED_RESPONSE_FILE is not None: try: with open(CANNED_RESPONSE_FILE, 'r') as f: canned_responses = json.load(f) except Exception: canned_responses = {} if 'timeRange' in request: key_request = dict(request) del key_reque...
[ "def", "rdb_rpc", "(", "method", ":", "str", ",", "request", ":", "dict", ")", "->", "dict", ":", "if", "CANNED_RESPONSE_FILE", "is", "not", "None", ":", "try", ":", "with", "open", "(", "CANNED_RESPONSE_FILE", ",", "'r'", ")", "as", "f", ":", "canned_...
Call the given RPC method, with the given request.
[ "Call", "the", "given", "RPC", "method", "with", "the", "given", "request", "." ]
[ "\"\"\"Call the given RPC method, with the given request.\n\n Args:\n method: The method to call. Must be within luci.resultdb.v1.ResultDB.\n request: The request, in dict format.\n\n Returns:\n The response from ResultDB, in dict format.\n \"\"\"", "# HACK: Strip out timestamps when caching the reque...
[ { "param": "method", "type": "str" }, { "param": "request", "type": "dict" } ]
{ "returns": [ { "docstring": "The response from ResultDB, in dict format.", "docstring_tokens": [ "The", "response", "from", "ResultDB", "in", "dict", "format", "." ], "type": null } ], "raises": [], "params": [ ...
6896fda5aaf413ae5c9e3d8e39ef67cc2ac1792a
sunlongbo/chromium
tools/metrics/common/path_util.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetInputFile
<not_specific>
def GetInputFile(src_relative_file_path): """Converts a src/-relative file path into a path that can be opened.""" depth = [os.path.dirname(__file__), '..', '..', '..'] path = os.path.join(*(depth + src_relative_file_path.split('/'))) return os.path.abspath(path)
Converts a src/-relative file path into a path that can be opened.
Converts a src/-relative file path into a path that can be opened.
[ "Converts", "a", "src", "/", "-", "relative", "file", "path", "into", "a", "path", "that", "can", "be", "opened", "." ]
def GetInputFile(src_relative_file_path): depth = [os.path.dirname(__file__), '..', '..', '..'] path = os.path.join(*(depth + src_relative_file_path.split('/'))) return os.path.abspath(path)
[ "def", "GetInputFile", "(", "src_relative_file_path", ")", ":", "depth", "=", "[", "os", ".", "path", ".", "dirname", "(", "__file__", ")", ",", "'..'", ",", "'..'", ",", "'..'", "]", "path", "=", "os", ".", "path", ".", "join", "(", "*", "(", "dep...
Converts a src/-relative file path into a path that can be opened.
[ "Converts", "a", "src", "/", "-", "relative", "file", "path", "into", "a", "path", "that", "can", "be", "opened", "." ]
[ "\"\"\"Converts a src/-relative file path into a path that can be opened.\"\"\"" ]
[ { "param": "src_relative_file_path", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "src_relative_file_path", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b9b0c22fc5e5c78b62ad43a67b59c3816e99f101
sunlongbo/chromium
tools/android/modularization/convenience/lookup_dep.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
match
List[ClassEntry]
def match(self, search_string: str) -> List[ClassEntry]: """Get class/target entries where the class matches search_string""" # Priority 1: Exact full matches if search_string in self._class_index: return self._entries_for(search_string) # Priority 2: Match full class name (any case), if it's a c...
Get class/target entries where the class matches search_string
Get class/target entries where the class matches search_string
[ "Get", "class", "/", "target", "entries", "where", "the", "class", "matches", "search_string" ]
def match(self, search_string: str) -> List[ClassEntry]: if search_string in self._class_index: return self._entries_for(search_string) matches = [] lower_search_string = search_string.lower() if '.' not in lower_search_string: for full_class_name in self._class_index: package_and_cl...
[ "def", "match", "(", "self", ",", "search_string", ":", "str", ")", "->", "List", "[", "ClassEntry", "]", ":", "if", "search_string", "in", "self", ".", "_class_index", ":", "return", "self", ".", "_entries_for", "(", "search_string", ")", "matches", "=", ...
Get class/target entries where the class matches search_string
[ "Get", "class", "/", "target", "entries", "where", "the", "class", "matches", "search_string" ]
[ "\"\"\"Get class/target entries where the class matches search_string\"\"\"", "# Priority 1: Exact full matches", "# Priority 2: Match full class name (any case), if it's a class name", "# Priority 3: Match anything" ]
[ { "param": "self", "type": null }, { "param": "search_string", "type": "str" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "search_string", "type": "str", "docstring": null, "docstring_...
b9b0c22fc5e5c78b62ad43a67b59c3816e99f101
sunlongbo/chromium
tools/android/modularization/convenience/lookup_dep.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_index_root
Dict[str, List[TargetInfo]]
def _index_root(self) -> Dict[str, List[TargetInfo]]: """Create the class to target index.""" logging.debug('Running list_java_targets.py...') list_java_targets_command = [ 'build/android/list_java_targets.py', '--gn-labels', '--print-build-config-paths', f'--output-directory={self._...
Create the class to target index.
Create the class to target index.
[ "Create", "the", "class", "to", "target", "index", "." ]
def _index_root(self) -> Dict[str, List[TargetInfo]]: logging.debug('Running list_java_targets.py...') list_java_targets_command = [ 'build/android/list_java_targets.py', '--gn-labels', '--print-build-config-paths', f'--output-directory={self._abs_build_output_dir}' ] if self._sh...
[ "def", "_index_root", "(", "self", ")", "->", "Dict", "[", "str", ",", "List", "[", "TargetInfo", "]", "]", ":", "logging", ".", "debug", "(", "'Running list_java_targets.py...'", ")", "list_java_targets_command", "=", "[", "'build/android/list_java_targets.py'", ...
Create the class to target index.
[ "Create", "the", "class", "to", "target", "index", "." ]
[ "\"\"\"Create the class to target index.\"\"\"", "# Parse output of list_java_targets.py with mapping of build_target to", "# build_config", "# Skip empty lines", "# Checking the library type here instead of in list_java_targets.py avoids", "# reading each .build_config file twice." ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b9b0c22fc5e5c78b62ad43a67b59c3816e99f101
sunlongbo/chromium
tools/android/modularization/convenience/lookup_dep.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_compute_toplevel_target
str
def _compute_toplevel_target(target: str) -> str: """Computes top level target from the passed-in sub-target.""" if target.endswith('_java'): return target # Handle android_aar_prebuilt() sub targets. index = target.find('_java__subjar') if index >= 0: return target[0:index + 5] ind...
Computes top level target from the passed-in sub-target.
Computes top level target from the passed-in sub-target.
[ "Computes", "top", "level", "target", "from", "the", "passed", "-", "in", "sub", "-", "target", "." ]
def _compute_toplevel_target(target: str) -> str: if target.endswith('_java'): return target index = target.find('_java__subjar') if index >= 0: return target[0:index + 5] index = target.find('_java__classes') if index >= 0: return target[0:index + 5] return target
[ "def", "_compute_toplevel_target", "(", "target", ":", "str", ")", "->", "str", ":", "if", "target", ".", "endswith", "(", "'_java'", ")", ":", "return", "target", "index", "=", "target", ".", "find", "(", "'_java__subjar'", ")", "if", "index", ">=", "0"...
Computes top level target from the passed-in sub-target.
[ "Computes", "top", "level", "target", "from", "the", "passed", "-", "in", "sub", "-", "target", "." ]
[ "\"\"\"Computes top level target from the passed-in sub-target.\"\"\"", "# Handle android_aar_prebuilt() sub targets." ]
[ { "param": "target", "type": "str" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "target", "type": "str", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b9b0c22fc5e5c78b62ad43a67b59c3816e99f101
sunlongbo/chromium
tools/android/modularization/convenience/lookup_dep.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_compute_full_class_names_for_build_config
Set[str]
def _compute_full_class_names_for_build_config(self, deps_info: Dict) -> Set[str]: """Returns set of fully qualified class names for build config.""" full_class_names = set() # Read the location of the java_sources_file from the build_config sources_pat...
Returns set of fully qualified class names for build config.
Returns set of fully qualified class names for build config.
[ "Returns", "set", "of", "fully", "qualified", "class", "names", "for", "build", "config", "." ]
def _compute_full_class_names_for_build_config(self, deps_info: Dict) -> Set[str]: full_class_names = set() sources_path = deps_info.get('java_sources_file') if sources_path: with open(self._abs_build_output_dir / sources_path) as sources_contents: ...
[ "def", "_compute_full_class_names_for_build_config", "(", "self", ",", "deps_info", ":", "Dict", ")", "->", "Set", "[", "str", "]", ":", "full_class_names", "=", "set", "(", ")", "sources_path", "=", "deps_info", ".", "get", "(", "'java_sources_file'", ")", "i...
Returns set of fully qualified class names for build config.
[ "Returns", "set", "of", "fully", "qualified", "class", "names", "for", "build", "config", "." ]
[ "\"\"\"Returns set of fully qualified class names for build config.\"\"\"", "# Read the location of the java_sources_file from the build_config", "# Read the java_sources_file, indexing the classes found", "# |unprocessed_jar_path| is set for prebuilt targets. (ex:", "# android_aar_prebuilt())", "# |unpro...
[ { "param": "self", "type": null }, { "param": "deps_info", "type": "Dict" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "deps_info", "type": "Dict", "docstring": null, "docstring_tok...
b9b0c22fc5e5c78b62ad43a67b59c3816e99f101
sunlongbo/chromium
tools/android/modularization/convenience/lookup_dep.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_extract_full_class_names_from_jar
Set[str]
def _extract_full_class_names_from_jar(abs_build_output_dir: pathlib.Path, abs_jar_path: pathlib.Path ) -> Set[str]: """Returns set of fully qualified class names in passed-in jar.""" out = set() jar_namelist = ClassLookupInde...
Returns set of fully qualified class names in passed-in jar.
Returns set of fully qualified class names in passed-in jar.
[ "Returns", "set", "of", "fully", "qualified", "class", "names", "in", "passed", "-", "in", "jar", "." ]
def _extract_full_class_names_from_jar(abs_build_output_dir: pathlib.Path, abs_jar_path: pathlib.Path ) -> Set[str]: out = set() jar_namelist = ClassLookupIndex._read_jar_namelist(abs_build_output_dir, ...
[ "def", "_extract_full_class_names_from_jar", "(", "abs_build_output_dir", ":", "pathlib", ".", "Path", ",", "abs_jar_path", ":", "pathlib", ".", "Path", ")", "->", "Set", "[", "str", "]", ":", "out", "=", "set", "(", ")", "jar_namelist", "=", "ClassLookupIndex...
Returns set of fully qualified class names in passed-in jar.
[ "Returns", "set", "of", "fully", "qualified", "class", "names", "in", "passed", "-", "in", "jar", "." ]
[ "\"\"\"Returns set of fully qualified class names in passed-in jar.\"\"\"", "# Remove .class suffix" ]
[ { "param": "abs_build_output_dir", "type": "pathlib.Path" }, { "param": "abs_jar_path", "type": "pathlib.Path" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "abs_build_output_dir", "type": "pathlib.Path", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "abs_jar_path", "type": "pathlib.Path", "d...
b9b0c22fc5e5c78b62ad43a67b59c3816e99f101
sunlongbo/chromium
tools/android/modularization/convenience/lookup_dep.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_read_jar_namelist
List[str]
def _read_jar_namelist(abs_build_output_dir: pathlib.Path, abs_jar_path: pathlib.Path) -> List[str]: """Returns list of jar members by name.""" # Caching namelist speeds up lookup_dep.py runtime by 1.5s. cache_path = abs_jar_path.with_suffix(abs_jar_path.suffix + ...
Returns list of jar members by name.
Returns list of jar members by name.
[ "Returns", "list", "of", "jar", "members", "by", "name", "." ]
def _read_jar_namelist(abs_build_output_dir: pathlib.Path, abs_jar_path: pathlib.Path) -> List[str]: cache_path = abs_jar_path.with_suffix(abs_jar_path.suffix + '.namelist_cache') if (not ClassLookupIndex._is_path_relative_to(abs_jar_path, ...
[ "def", "_read_jar_namelist", "(", "abs_build_output_dir", ":", "pathlib", ".", "Path", ",", "abs_jar_path", ":", "pathlib", ".", "Path", ")", "->", "List", "[", "str", "]", ":", "cache_path", "=", "abs_jar_path", ".", "with_suffix", "(", "abs_jar_path", ".", ...
Returns list of jar members by name.
[ "Returns", "list", "of", "jar", "members", "by", "name", "." ]
[ "\"\"\"Returns list of jar members by name.\"\"\"", "# Caching namelist speeds up lookup_dep.py runtime by 1.5s." ]
[ { "param": "abs_build_output_dir", "type": "pathlib.Path" }, { "param": "abs_jar_path", "type": "pathlib.Path" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "abs_build_output_dir", "type": "pathlib.Path", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "abs_jar_path", "type": "pathlib.Path", "d...
b9b0c22fc5e5c78b62ad43a67b59c3816e99f101
sunlongbo/chromium
tools/android/modularization/convenience/lookup_dep.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_parse_full_java_class
str
def _parse_full_java_class(source_path: pathlib.Path) -> str: """Guess the fully qualified class name from the path to the source file.""" if source_path.suffix != '.java': logging.warning(f'"{source_path}" does not have the .java suffix') return None directory_path: pathlib.Path = source_path....
Guess the fully qualified class name from the path to the source file.
Guess the fully qualified class name from the path to the source file.
[ "Guess", "the", "fully", "qualified", "class", "name", "from", "the", "path", "to", "the", "source", "file", "." ]
def _parse_full_java_class(source_path: pathlib.Path) -> str: if source_path.suffix != '.java': logging.warning(f'"{source_path}" does not have the .java suffix') return None directory_path: pathlib.Path = source_path.parent package_list_reversed = [] for part in reversed(directory_path.part...
[ "def", "_parse_full_java_class", "(", "source_path", ":", "pathlib", ".", "Path", ")", "->", "str", ":", "if", "source_path", ".", "suffix", "!=", "'.java'", ":", "logging", ".", "warning", "(", "f'\"{source_path}\" does not have the .java suffix'", ")", "return", ...
Guess the fully qualified class name from the path to the source file.
[ "Guess", "the", "fully", "qualified", "class", "name", "from", "the", "path", "to", "the", "source", "file", "." ]
[ "\"\"\"Guess the fully qualified class name from the path to the source file.\"\"\"" ]
[ { "param": "source_path", "type": "pathlib.Path" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "source_path", "type": "pathlib.Path", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
BuildDir
null
def BuildDir(dirname=None): """Helper function used to manage a build directory. Args: dirname: Optional build directory path. If not provided, a temporary directory will be created and cleaned up on exit. Returns: A python context manager modelling a directory path. The manager r...
Helper function used to manage a build directory. Args: dirname: Optional build directory path. If not provided, a temporary directory will be created and cleaned up on exit. Returns: A python context manager modelling a directory path. The manager removes the directory if necessary o...
Helper function used to manage a build directory.
[ "Helper", "function", "used", "to", "manage", "a", "build", "directory", "." ]
def BuildDir(dirname=None): delete = False if not dirname: dirname = tempfile.mkdtemp() delete = True try: yield dirname finally: if delete: shutil.rmtree(dirname)
[ "def", "BuildDir", "(", "dirname", "=", "None", ")", ":", "delete", "=", "False", "if", "not", "dirname", ":", "dirname", "=", "tempfile", ".", "mkdtemp", "(", ")", "delete", "=", "True", "try", ":", "yield", "dirname", "finally", ":", "if", "delete", ...
Helper function used to manage a build directory.
[ "Helper", "function", "used", "to", "manage", "a", "build", "directory", "." ]
[ "\"\"\"Helper function used to manage a build directory.\n\n Args:\n dirname: Optional build directory path. If not provided, a temporary\n directory will be created and cleaned up on exit.\n Returns:\n A python context manager modelling a directory path. The manager\n removes the direct...
[ { "param": "dirname", "type": null } ]
{ "returns": [ { "docstring": "A python context manager modelling a directory path. The manager\nremoves the directory if necessary on exit.", "docstring_tokens": [ "A", "python", "context", "manager", "modelling", "a", "directory", "path...
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
RunCommand
null
def RunCommand(args, print_stdout=False, cwd=None): """Run a new shell command. This function runs without printing anything. Args: args: A string or a list of strings for the shell command. Raises: On failure, raise an Exception that contains the command's arguments, return status, and standard...
Run a new shell command. This function runs without printing anything. Args: args: A string or a list of strings for the shell command. Raises: On failure, raise an Exception that contains the command's arguments, return status, and standard output + error merged in a single message.
Run a new shell command. This function runs without printing anything. A string or a list of strings for the shell command. Raises: On failure, raise an Exception that contains the command's arguments, return status, and standard output + error merged in a single message.
[ "Run", "a", "new", "shell", "command", ".", "This", "function", "runs", "without", "printing", "anything", ".", "A", "string", "or", "a", "list", "of", "strings", "for", "the", "shell", "command", ".", "Raises", ":", "On", "failure", "raise", "an", "Exce...
def RunCommand(args, print_stdout=False, cwd=None): logging.debug('Run %s', args) stdout = None if print_stdout else subprocess.PIPE p = subprocess.Popen(args, stdout=stdout, cwd=cwd) pout, _ = p.communicate() if p.returncode != 0: RaiseCommandException(args, p.returncode, None, pout)
[ "def", "RunCommand", "(", "args", ",", "print_stdout", "=", "False", ",", "cwd", "=", "None", ")", ":", "logging", ".", "debug", "(", "'Run %s'", ",", "args", ")", "stdout", "=", "None", "if", "print_stdout", "else", "subprocess", ".", "PIPE", "p", "="...
Run a new shell command.
[ "Run", "a", "new", "shell", "command", "." ]
[ "\"\"\"Run a new shell command.\n\n This function runs without printing anything.\n\n Args:\n args: A string or a list of strings for the shell command.\n Raises:\n On failure, raise an Exception that contains the command's arguments,\n return status, and standard output + error merged in a single messa...
[ { "param": "args", "type": null }, { "param": "print_stdout", "type": null }, { "param": "cwd", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "print_stdout", "type": null, "docstring": null, "docstring_to...
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
RunCommandAndGetOutput
<not_specific>
def RunCommandAndGetOutput(args): """Run a new shell command. Return its output. Exception on failure. This function runs without printing anything. Args: args: A string or a list of strings for the shell command. Returns: The command's output. Raises: On failure, raise an Exception that conta...
Run a new shell command. Return its output. Exception on failure. This function runs without printing anything. Args: args: A string or a list of strings for the shell command. Returns: The command's output. Raises: On failure, raise an Exception that contains the command's arguments, return s...
Run a new shell command. Return its output. Exception on failure. This function runs without printing anything. A string or a list of strings for the shell command. Returns: The command's output. Raises: On failure, raise an Exception that contains the command's arguments, return status, and standard output, and stand...
[ "Run", "a", "new", "shell", "command", ".", "Return", "its", "output", ".", "Exception", "on", "failure", ".", "This", "function", "runs", "without", "printing", "anything", ".", "A", "string", "or", "a", "list", "of", "strings", "for", "the", "shell", "...
def RunCommandAndGetOutput(args): logging.debug('Run %s', args) p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) pout, perr = p.communicate() if p.returncode != 0: RaiseCommandException(args, p.returncode, pout, perr) return pout
[ "def", "RunCommandAndGetOutput", "(", "args", ")", ":", "logging", ".", "debug", "(", "'Run %s'", ",", "args", ")", "p", "=", "subprocess", ".", "Popen", "(", "args", ",", "stdout", "=", "subprocess", ".", "PIPE", ",", "stderr", "=", "subprocess", ".", ...
Run a new shell command.
[ "Run", "a", "new", "shell", "command", "." ]
[ "\"\"\"Run a new shell command. Return its output. Exception on failure.\n\n This function runs without printing anything.\n\n Args:\n args: A string or a list of strings for the shell command.\n Returns:\n The command's output.\n Raises:\n On failure, raise an Exception that contains the command's arg...
[ { "param": "args", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
MakeDirectory
null
def MakeDirectory(dir_path): """Make directory |dir_path| recursively if necessary.""" if dir_path != '' and not os.path.isdir(dir_path): logging.debug('mkdir [%s]', dir_path) os.makedirs(dir_path)
Make directory |dir_path| recursively if necessary.
Make directory |dir_path| recursively if necessary.
[ "Make", "directory", "|dir_path|", "recursively", "if", "necessary", "." ]
def MakeDirectory(dir_path): if dir_path != '' and not os.path.isdir(dir_path): logging.debug('mkdir [%s]', dir_path) os.makedirs(dir_path)
[ "def", "MakeDirectory", "(", "dir_path", ")", ":", "if", "dir_path", "!=", "''", "and", "not", "os", ".", "path", ".", "isdir", "(", "dir_path", ")", ":", "logging", ".", "debug", "(", "'mkdir [%s]'", ",", "dir_path", ")", "os", ".", "makedirs", "(", ...
Make directory |dir_path| recursively if necessary.
[ "Make", "directory", "|dir_path|", "recursively", "if", "necessary", "." ]
[ "\"\"\"Make directory |dir_path| recursively if necessary.\"\"\"" ]
[ { "param": "dir_path", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "dir_path", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
DeleteDirectory
null
def DeleteDirectory(dir_path): """Recursively delete a directory if it exists.""" if os.path.exists(dir_path): logging.debug('rmdir [%s]', dir_path) shutil.rmtree(dir_path)
Recursively delete a directory if it exists.
Recursively delete a directory if it exists.
[ "Recursively", "delete", "a", "directory", "if", "it", "exists", "." ]
def DeleteDirectory(dir_path): if os.path.exists(dir_path): logging.debug('rmdir [%s]', dir_path) shutil.rmtree(dir_path)
[ "def", "DeleteDirectory", "(", "dir_path", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "dir_path", ")", ":", "logging", ".", "debug", "(", "'rmdir [%s]'", ",", "dir_path", ")", "shutil", ".", "rmtree", "(", "dir_path", ")" ]
Recursively delete a directory if it exists.
[ "Recursively", "delete", "a", "directory", "if", "it", "exists", "." ]
[ "\"\"\"Recursively delete a directory if it exists.\"\"\"" ]
[ { "param": "dir_path", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "dir_path", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
FindInDirectory
<not_specific>
def FindInDirectory(directory, filename_filter): """Find all files in a directory that matches a given filename filter.""" files = [] for root, _dirnames, filenames in os.walk(directory): matched_files = fnmatch.filter(filenames, filename_filter) files.extend((os.path.join(root, f) for f in ...
Find all files in a directory that matches a given filename filter.
Find all files in a directory that matches a given filename filter.
[ "Find", "all", "files", "in", "a", "directory", "that", "matches", "a", "given", "filename", "filter", "." ]
def FindInDirectory(directory, filename_filter): files = [] for root, _dirnames, filenames in os.walk(directory): matched_files = fnmatch.filter(filenames, filename_filter) files.extend((os.path.join(root, f) for f in matched_files)) return files
[ "def", "FindInDirectory", "(", "directory", ",", "filename_filter", ")", ":", "files", "=", "[", "]", "for", "root", ",", "_dirnames", ",", "filenames", "in", "os", ".", "walk", "(", "directory", ")", ":", "matched_files", "=", "fnmatch", ".", "filter", ...
Find all files in a directory that matches a given filename filter.
[ "Find", "all", "files", "in", "a", "directory", "that", "matches", "a", "given", "filename", "filter", "." ]
[ "\"\"\"Find all files in a directory that matches a given filename filter.\"\"\"" ]
[ { "param": "directory", "type": null }, { "param": "filename_filter", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "directory", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename_filter", "type": null, "docstring": null, "docs...
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
_ParseSubprojects
<not_specific>
def _ParseSubprojects(subproject_path): """Parses listing of subproject build.gradle files. Returns list of paths.""" if not os.path.exists(subproject_path): return None subprojects = [] for subproject in open(subproject_path): subproject = subproject.strip() if subproject and n...
Parses listing of subproject build.gradle files. Returns list of paths.
Parses listing of subproject build.gradle files. Returns list of paths.
[ "Parses", "listing", "of", "subproject", "build", ".", "gradle", "files", ".", "Returns", "list", "of", "paths", "." ]
def _ParseSubprojects(subproject_path): if not os.path.exists(subproject_path): return None subprojects = [] for subproject in open(subproject_path): subproject = subproject.strip() if subproject and not subproject.startswith('#'): subprojects.append(subproject) retur...
[ "def", "_ParseSubprojects", "(", "subproject_path", ")", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "subproject_path", ")", ":", "return", "None", "subprojects", "=", "[", "]", "for", "subproject", "in", "open", "(", "subproject_path", ")", "...
Parses listing of subproject build.gradle files.
[ "Parses", "listing", "of", "subproject", "build", ".", "gradle", "files", "." ]
[ "\"\"\"Parses listing of subproject build.gradle files. Returns list of paths.\"\"\"" ]
[ { "param": "subproject_path", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "subproject_path", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetCipdPackageInfo
<not_specific>
def GetCipdPackageInfo(cipd_yaml_path): """Returns the CIPD package name corresponding to a given cipd.yaml file. Args: cipd_yaml_path: Path of input cipd.yaml file. Returns: A (package_name, package_tag) tuple. Raises: Exception if the file could not be read. """ package_name = None pa...
Returns the CIPD package name corresponding to a given cipd.yaml file. Args: cipd_yaml_path: Path of input cipd.yaml file. Returns: A (package_name, package_tag) tuple. Raises: Exception if the file could not be read.
Returns the CIPD package name corresponding to a given cipd.yaml file. Args: cipd_yaml_path: Path of input cipd.yaml file.
[ "Returns", "the", "CIPD", "package", "name", "corresponding", "to", "a", "given", "cipd", ".", "yaml", "file", ".", "Args", ":", "cipd_yaml_path", ":", "Path", "of", "input", "cipd", ".", "yaml", "file", "." ]
def GetCipdPackageInfo(cipd_yaml_path): package_name = None package_tag = None for line in ReadFileAsLines(cipd_yaml_path): m = _RE_CIPD_PACKAGE.match(line) if m: package_name = m.group(1) m = _RE_CIPD_CREATE.search(line) if m: package_tag = m.group(1)...
[ "def", "GetCipdPackageInfo", "(", "cipd_yaml_path", ")", ":", "package_name", "=", "None", "package_tag", "=", "None", "for", "line", "in", "ReadFileAsLines", "(", "cipd_yaml_path", ")", ":", "m", "=", "_RE_CIPD_PACKAGE", ".", "match", "(", "line", ")", "if", ...
Returns the CIPD package name corresponding to a given cipd.yaml file.
[ "Returns", "the", "CIPD", "package", "name", "corresponding", "to", "a", "given", "cipd", ".", "yaml", "file", "." ]
[ "\"\"\"Returns the CIPD package name corresponding to a given cipd.yaml file.\n\n Args:\n cipd_yaml_path: Path of input cipd.yaml file.\n Returns:\n A (package_name, package_tag) tuple.\n Raises:\n Exception if the file could not be read.\n \"\"\"" ]
[ { "param": "cipd_yaml_path", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cipd_yaml_path", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
ParseDeps
<not_specific>
def ParseDeps(root_dir, libs_dir): """Parse an android_deps/libs and retrieve package information. Args: root_dir: Path to a root Chromium or build directory. Returns: A directory mapping package names to tuples of (cipd_yaml_file, package_name, package_tag), where |cipd_yaml_file| is the path ...
Parse an android_deps/libs and retrieve package information. Args: root_dir: Path to a root Chromium or build directory. Returns: A directory mapping package names to tuples of (cipd_yaml_file, package_name, package_tag), where |cipd_yaml_file| is the path to the cipd.yaml file, related to |libs_di...
Parse an android_deps/libs and retrieve package information.
[ "Parse", "an", "android_deps", "/", "libs", "and", "retrieve", "package", "information", "." ]
def ParseDeps(root_dir, libs_dir): result = {} root_dir = os.path.abspath(root_dir) libs_dir = os.path.abspath(os.path.join(root_dir, libs_dir)) for cipd_file in FindInDirectory(libs_dir, 'cipd.yaml'): pkg_name, pkg_tag = GetCipdPackageInfo(cipd_file) cipd_path = os.path.dirname(cipd_fil...
[ "def", "ParseDeps", "(", "root_dir", ",", "libs_dir", ")", ":", "result", "=", "{", "}", "root_dir", "=", "os", ".", "path", ".", "abspath", "(", "root_dir", ")", "libs_dir", "=", "os", ".", "path", ".", "abspath", "(", "os", ".", "path", ".", "joi...
Parse an android_deps/libs and retrieve package information.
[ "Parse", "an", "android_deps", "/", "libs", "and", "retrieve", "package", "information", "." ]
[ "\"\"\"Parse an android_deps/libs and retrieve package information.\n\n Args:\n root_dir: Path to a root Chromium or build directory.\n Returns:\n A directory mapping package names to tuples of\n (cipd_yaml_file, package_name, package_tag), where |cipd_yaml_file|\n is the path to the cipd.yaml file, r...
[ { "param": "root_dir", "type": null }, { "param": "libs_dir", "type": null } ]
{ "returns": [ { "docstring": "A directory mapping package names to tuples of\n(cipd_yaml_file, package_name, package_tag), where |cipd_yaml_file|\nis the path to the cipd.yaml file, related to |libs_dir|,\nand |package_name| and |package_tag| are the extracted from it.", "docstring_tokens": [ ...
b3c4962f9ab8b81ff1f0788a33cc63041ce3e7a1
sunlongbo/chromium
third_party/android_deps/fetch_all.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
PrintPackageList
null
def PrintPackageList(packages, list_name): """Print a list of packages to standard output. Args: packages: list of package names. list_name: a simple word describing the package list (e.g. 'new') """ print(' {} {} packages:'.format(len(packages), list_name)) print('\n'.join(' - ' + p for p ...
Print a list of packages to standard output. Args: packages: list of package names. list_name: a simple word describing the package list (e.g. 'new')
Print a list of packages to standard output.
[ "Print", "a", "list", "of", "packages", "to", "standard", "output", "." ]
def PrintPackageList(packages, list_name): print(' {} {} packages:'.format(len(packages), list_name)) print('\n'.join(' - ' + p for p in packages))
[ "def", "PrintPackageList", "(", "packages", ",", "list_name", ")", ":", "print", "(", "' {} {} packages:'", ".", "format", "(", "len", "(", "packages", ")", ",", "list_name", ")", ")", "print", "(", "'\\n'", ".", "join", "(", "' - '", "+", "p", "for"...
Print a list of packages to standard output.
[ "Print", "a", "list", "of", "packages", "to", "standard", "output", "." ]
[ "\"\"\"Print a list of packages to standard output.\n\n Args:\n packages: list of package names.\n list_name: a simple word describing the package list (e.g. 'new')\n \"\"\"" ]
[ { "param": "packages", "type": null }, { "param": "list_name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "packages", "type": null, "docstring": "list of package names.", "docstring_tokens": [ "list", "of", "package", "names", "." ], "default": null, "is_optional": null ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
InitializePrefix
null
def InitializePrefix(mixed_case_prefix): """Initialize prefix used for autogenerated code. Must be called before autogenerating code. Prefixes are used by autogenerated code in many places: class names, filenames, namespaces, constants, defines. Given a single mixed case prefix suitable for a class name, we al...
Initialize prefix used for autogenerated code. Must be called before autogenerating code. Prefixes are used by autogenerated code in many places: class names, filenames, namespaces, constants, defines. Given a single mixed case prefix suitable for a class name, we also initialize lower and upper case prefixes ...
Initialize prefix used for autogenerated code. Must be called before autogenerating code. Prefixes are used by autogenerated code in many places: class names, filenames, namespaces, constants, defines. Given a single mixed case prefix suitable for a class name, we also initialize lower and upper case prefixes for other...
[ "Initialize", "prefix", "used", "for", "autogenerated", "code", ".", "Must", "be", "called", "before", "autogenerating", "code", ".", "Prefixes", "are", "used", "by", "autogenerated", "code", "in", "many", "places", ":", "class", "names", "filenames", "namespace...
def InitializePrefix(mixed_case_prefix): global _prefix if _prefix: raise AssertionError _prefix = mixed_case_prefix global _upper_prefix _upper_prefix = mixed_case_prefix.upper() global _lower_prefix _lower_prefix = mixed_case_prefix.lower()
[ "def", "InitializePrefix", "(", "mixed_case_prefix", ")", ":", "global", "_prefix", "if", "_prefix", ":", "raise", "AssertionError", "_prefix", "=", "mixed_case_prefix", "global", "_upper_prefix", "_upper_prefix", "=", "mixed_case_prefix", ".", "upper", "(", ")", "g...
Initialize prefix used for autogenerated code.
[ "Initialize", "prefix", "used", "for", "autogenerated", "code", "." ]
[ "\"\"\"Initialize prefix used for autogenerated code.\n\n Must be called before autogenerating code. Prefixes are used by autogenerated\n code in many places: class names, filenames, namespaces, constants,\n defines. Given a single mixed case prefix suitable for a class name, we also\n initialize lower and uppe...
[ { "param": "mixed_case_prefix", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "mixed_case_prefix", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
EnumsConflict
<not_specific>
def EnumsConflict(a, b): """Returns true if the enums have different names (ignoring suffixes) and one of them is a Chromium enum.""" if a == b: return False if b.endswith('_CHROMIUM'): a, b = b, a if not a.endswith('_CHROMIUM'): return False def removesuffix(string, suffix): if not strin...
Returns true if the enums have different names (ignoring suffixes) and one of them is a Chromium enum.
Returns true if the enums have different names (ignoring suffixes) and one of them is a Chromium enum.
[ "Returns", "true", "if", "the", "enums", "have", "different", "names", "(", "ignoring", "suffixes", ")", "and", "one", "of", "them", "is", "a", "Chromium", "enum", "." ]
def EnumsConflict(a, b): if a == b: return False if b.endswith('_CHROMIUM'): a, b = b, a if not a.endswith('_CHROMIUM'): return False def removesuffix(string, suffix): if not string.endswith(suffix): return string return string[:-len(suffix)] b = removesuffix(b, "_NV") b = removesu...
[ "def", "EnumsConflict", "(", "a", ",", "b", ")", ":", "if", "a", "==", "b", ":", "return", "False", "if", "b", ".", "endswith", "(", "'_CHROMIUM'", ")", ":", "a", ",", "b", "=", "b", ",", "a", "if", "not", "a", ".", "endswith", "(", "'_CHROMIUM...
Returns true if the enums have different names (ignoring suffixes) and one of them is a Chromium enum.
[ "Returns", "true", "if", "the", "enums", "have", "different", "names", "(", "ignoring", "suffixes", ")", "and", "one", "of", "them", "is", "a", "Chromium", "enum", "." ]
[ "\"\"\"Returns true if the enums have different names (ignoring suffixes) and one\n of them is a Chromium enum.\"\"\"" ]
[ { "param": "a", "type": null }, { "param": "b", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "a", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "b", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteStruct
null
def WriteStruct(self, func, f): """Writes a structure that matches the arguments to a function.""" comment = func.GetInfo('cmd_comment') if not comment == None: f.write(comment) f.write("struct %s {\n" % func.name) f.write(" typedef %s ValueType;\n" % func.name) f.write(" static const Co...
Writes a structure that matches the arguments to a function.
Writes a structure that matches the arguments to a function.
[ "Writes", "a", "structure", "that", "matches", "the", "arguments", "to", "a", "function", "." ]
def WriteStruct(self, func, f): comment = func.GetInfo('cmd_comment') if not comment == None: f.write(comment) f.write("struct %s {\n" % func.name) f.write(" typedef %s ValueType;\n" % func.name) f.write(" static const CommandId kCmdId = k%s;\n" % func.name) func.WriteCmdArgFlag(f) f...
[ "def", "WriteStruct", "(", "self", ",", "func", ",", "f", ")", ":", "comment", "=", "func", ".", "GetInfo", "(", "'cmd_comment'", ")", "if", "not", "comment", "==", "None", ":", "f", ".", "write", "(", "comment", ")", "f", ".", "write", "(", "\"str...
Writes a structure that matches the arguments to a function.
[ "Writes", "a", "structure", "that", "matches", "the", "arguments", "to", "a", "function", "." ]
[ "\"\"\"Writes a structure that matches the arguments to a function.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteHandlerImplementation
null
def WriteHandlerImplementation(self, func, f): """Writes the handler implementation for this command.""" args = [] for arg in func.GetOriginalArgs(): if arg.name.endswith("size") and arg.type == "GLsizei": args.append("num_%s" % func.GetLastOriginalArg().name) elif arg.name == "length": ...
Writes the handler implementation for this command.
Writes the handler implementation for this command.
[ "Writes", "the", "handler", "implementation", "for", "this", "command", "." ]
def WriteHandlerImplementation(self, func, f): args = [] for arg in func.GetOriginalArgs(): if arg.name.endswith("size") and arg.type == "GLsizei": args.append("num_%s" % func.GetLastOriginalArg().name) elif arg.name == "length": args.append("nullptr") else: args.append...
[ "def", "WriteHandlerImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "args", "=", "[", "]", "for", "arg", "in", "func", ".", "GetOriginalArgs", "(", ")", ":", "if", "arg", ".", "name", ".", "endswith", "(", "\"size\"", ")", "and", "arg"...
Writes the handler implementation for this command.
[ "Writes", "the", "handler", "implementation", "for", "this", "command", "." ]
[ "\"\"\"Writes the handler implementation for this command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteFormatTest
null
def WriteFormatTest(self, func, f): """Writes a format test for a command.""" f.write("TEST_F(%sFormatTest, %s) {\n" % (_prefix, func.name)) f.write(" cmds::%s& cmd = *GetBufferAs<cmds::%s>();\n" % (func.name, func.name)) f.write(" void* next_cmd = cmd.Set(\n") f.write(" &cmd")...
Writes a format test for a command.
Writes a format test for a command.
[ "Writes", "a", "format", "test", "for", "a", "command", "." ]
def WriteFormatTest(self, func, f): f.write("TEST_F(%sFormatTest, %s) {\n" % (_prefix, func.name)) f.write(" cmds::%s& cmd = *GetBufferAs<cmds::%s>();\n" % (func.name, func.name)) f.write(" void* next_cmd = cmd.Set(\n") f.write(" &cmd") args = func.GetCmdArgs() for value, a...
[ "def", "WriteFormatTest", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"TEST_F(%sFormatTest, %s) {\\n\"", "%", "(", "_prefix", ",", "func", ".", "name", ")", ")", "f", ".", "write", "(", "\" cmds::%s& cmd = *GetBufferAs<cmds::%s>();...
Writes a format test for a command.
[ "Writes", "a", "format", "test", "for", "a", "command", "." ]
[ "\"\"\"Writes a format test for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceHandlerFunctionHeader
<not_specific>
def WriteServiceHandlerFunctionHeader(self, func, f): """Writes function header for service implementation handlers.""" f.write("""error::Error %(prefix)sDecoderImpl::Handle%(name)s( uint32_t immediate_data_size, const volatile void* cmd_data) { """ % {'name': func.name, 'prefix' : _prefix}) i...
Writes function header for service implementation handlers.
Writes function header for service implementation handlers.
[ "Writes", "function", "header", "for", "service", "implementation", "handlers", "." ]
def WriteServiceHandlerFunctionHeader(self, func, f): f.write("""error::Error %(prefix)sDecoderImpl::Handle%(name)s( uint32_t immediate_data_size, const volatile void* cmd_data) { """ % {'name': func.name, 'prefix' : _prefix}) if func.IsES3(): f.write("""if (!feature_info_->IsWebGL2OrES3OrHi...
[ "def", "WriteServiceHandlerFunctionHeader", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"\"\"error::Error %(prefix)sDecoderImpl::Handle%(name)s(\n uint32_t immediate_data_size, const volatile void* cmd_data) {\n \"\"\"", "%", "{", "'name'", ...
Writes function header for service implementation handlers.
[ "Writes", "function", "header", "for", "service", "implementation", "handlers", "." ]
[ "\"\"\"Writes function header for service implementation handlers.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceHandlerArgGetCode
null
def WriteServiceHandlerArgGetCode(self, func, f): """Writes the argument unpack code for service handlers.""" if len(func.GetOriginalArgs()) > 0: for arg in func.GetOriginalArgs(): if not arg.IsPointer(): arg.WriteGetCode(f) # Write pointer arguments second. Sizes may be dependent...
Writes the argument unpack code for service handlers.
Writes the argument unpack code for service handlers.
[ "Writes", "the", "argument", "unpack", "code", "for", "service", "handlers", "." ]
def WriteServiceHandlerArgGetCode(self, func, f): if len(func.GetOriginalArgs()) > 0: for arg in func.GetOriginalArgs(): if not arg.IsPointer(): arg.WriteGetCode(f) for arg in func.GetOriginalArgs(): if arg.IsPointer(): self.WriteGetDataSizeCode(func, arg, f) ...
[ "def", "WriteServiceHandlerArgGetCode", "(", "self", ",", "func", ",", "f", ")", ":", "if", "len", "(", "func", ".", "GetOriginalArgs", "(", ")", ")", ">", "0", ":", "for", "arg", "in", "func", ".", "GetOriginalArgs", "(", ")", ":", "if", "not", "arg...
Writes the argument unpack code for service handlers.
[ "Writes", "the", "argument", "unpack", "code", "for", "service", "handlers", "." ]
[ "\"\"\"Writes the argument unpack code for service handlers.\"\"\"", "# Write pointer arguments second. Sizes may be dependent on other args" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteImmediateServiceHandlerArgGetCode
null
def WriteImmediateServiceHandlerArgGetCode(self, func, f): """Writes the argument unpack code for immediate service handlers.""" for arg in func.GetOriginalArgs(): if arg.IsPointer(): self.WriteGetDataSizeCode(func, arg, f) arg.WriteGetCode(f)
Writes the argument unpack code for immediate service handlers.
Writes the argument unpack code for immediate service handlers.
[ "Writes", "the", "argument", "unpack", "code", "for", "immediate", "service", "handlers", "." ]
def WriteImmediateServiceHandlerArgGetCode(self, func, f): for arg in func.GetOriginalArgs(): if arg.IsPointer(): self.WriteGetDataSizeCode(func, arg, f) arg.WriteGetCode(f)
[ "def", "WriteImmediateServiceHandlerArgGetCode", "(", "self", ",", "func", ",", "f", ")", ":", "for", "arg", "in", "func", ".", "GetOriginalArgs", "(", ")", ":", "if", "arg", ".", "IsPointer", "(", ")", ":", "self", ".", "WriteGetDataSizeCode", "(", "func"...
Writes the argument unpack code for immediate service handlers.
[ "Writes", "the", "argument", "unpack", "code", "for", "immediate", "service", "handlers", "." ]
[ "\"\"\"Writes the argument unpack code for immediate service handlers.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteBucketServiceHandlerArgGetCode
null
def WriteBucketServiceHandlerArgGetCode(self, func, f): """Writes the argument unpack code for bucket service handlers.""" for arg in func.GetCmdArgs(): arg.WriteGetCode(f) for arg in func.GetOriginalArgs(): if arg.IsConstant(): arg.WriteGetCode(f) self.WriteGetDataSizeCode(func, arg...
Writes the argument unpack code for bucket service handlers.
Writes the argument unpack code for bucket service handlers.
[ "Writes", "the", "argument", "unpack", "code", "for", "bucket", "service", "handlers", "." ]
def WriteBucketServiceHandlerArgGetCode(self, func, f): for arg in func.GetCmdArgs(): arg.WriteGetCode(f) for arg in func.GetOriginalArgs(): if arg.IsConstant(): arg.WriteGetCode(f) self.WriteGetDataSizeCode(func, arg, f)
[ "def", "WriteBucketServiceHandlerArgGetCode", "(", "self", ",", "func", ",", "f", ")", ":", "for", "arg", "in", "func", ".", "GetCmdArgs", "(", ")", ":", "arg", ".", "WriteGetCode", "(", "f", ")", "for", "arg", "in", "func", ".", "GetOriginalArgs", "(", ...
Writes the argument unpack code for bucket service handlers.
[ "Writes", "the", "argument", "unpack", "code", "for", "bucket", "service", "handlers", "." ]
[ "\"\"\"Writes the argument unpack code for bucket service handlers.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceImplementation
<not_specific>
def WriteServiceImplementation(self, func, f): """Writes the service implementation for a command.""" self.WriteServiceHandlerFunctionHeader(func, f) if func.IsES31(): return self.WriteHandlerExtensionCheck(func, f) self.WriteHandlerDeferReadWrite(func, f); self.WriteServiceHandlerArgGetCo...
Writes the service implementation for a command.
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
def WriteServiceImplementation(self, func, f): self.WriteServiceHandlerFunctionHeader(func, f) if func.IsES31(): return self.WriteHandlerExtensionCheck(func, f) self.WriteHandlerDeferReadWrite(func, f); self.WriteServiceHandlerArgGetCode(func, f) func.WriteHandlerValidation(f) func.Wri...
[ "def", "WriteServiceImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "self", ".", "WriteServiceHandlerFunctionHeader", "(", "func", ",", "f", ")", "if", "func", ".", "IsES31", "(", ")", ":", "return", "self", ".", "WriteHandlerExtensionCheck", ...
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
[ "\"\"\"Writes the service implementation for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteImmediateServiceImplementation
<not_specific>
def WriteImmediateServiceImplementation(self, func, f): """Writes the service implementation for an immediate version of command.""" self.WriteServiceHandlerFunctionHeader(func, f) if func.IsES31(): return self.WriteHandlerExtensionCheck(func, f) self.WriteHandlerDeferReadWrite(func, f); s...
Writes the service implementation for an immediate version of command.
Writes the service implementation for an immediate version of command.
[ "Writes", "the", "service", "implementation", "for", "an", "immediate", "version", "of", "command", "." ]
def WriteImmediateServiceImplementation(self, func, f): self.WriteServiceHandlerFunctionHeader(func, f) if func.IsES31(): return self.WriteHandlerExtensionCheck(func, f) self.WriteHandlerDeferReadWrite(func, f); self.WriteImmediateServiceHandlerArgGetCode(func, f) func.WriteHandlerValidati...
[ "def", "WriteImmediateServiceImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "self", ".", "WriteServiceHandlerFunctionHeader", "(", "func", ",", "f", ")", "if", "func", ".", "IsES31", "(", ")", ":", "return", "self", ".", "WriteHandlerExtensionC...
Writes the service implementation for an immediate version of command.
[ "Writes", "the", "service", "implementation", "for", "an", "immediate", "version", "of", "command", "." ]
[ "\"\"\"Writes the service implementation for an immediate version of command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteBucketServiceImplementation
<not_specific>
def WriteBucketServiceImplementation(self, func, f): """Writes the service implementation for a bucket version of command.""" self.WriteServiceHandlerFunctionHeader(func, f) if func.IsES31(): return self.WriteHandlerExtensionCheck(func, f) self.WriteHandlerDeferReadWrite(func, f); self.Wri...
Writes the service implementation for a bucket version of command.
Writes the service implementation for a bucket version of command.
[ "Writes", "the", "service", "implementation", "for", "a", "bucket", "version", "of", "command", "." ]
def WriteBucketServiceImplementation(self, func, f): self.WriteServiceHandlerFunctionHeader(func, f) if func.IsES31(): return self.WriteHandlerExtensionCheck(func, f) self.WriteHandlerDeferReadWrite(func, f); self.WriteBucketServiceHandlerArgGetCode(func, f) func.WriteHandlerValidation(f) ...
[ "def", "WriteBucketServiceImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "self", ".", "WriteServiceHandlerFunctionHeader", "(", "func", ",", "f", ")", "if", "func", ".", "IsES31", "(", ")", ":", "return", "self", ".", "WriteHandlerExtensionChec...
Writes the service implementation for a bucket version of command.
[ "Writes", "the", "service", "implementation", "for", "a", "bucket", "version", "of", "command", "." ]
[ "\"\"\"Writes the service implementation for a bucket version of command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WritePassthroughServiceFunctionHeader
null
def WritePassthroughServiceFunctionHeader(self, func, f): """Writes function header for service passthrough handlers.""" f.write("""error::Error GLES2DecoderPassthroughImpl::Handle%(name)s( uint32_t immediate_data_size, const volatile void* cmd_data) { """ % {'name': func.name}) if func.IsES3(...
Writes function header for service passthrough handlers.
Writes function header for service passthrough handlers.
[ "Writes", "function", "header", "for", "service", "passthrough", "handlers", "." ]
def WritePassthroughServiceFunctionHeader(self, func, f): f.write("""error::Error GLES2DecoderPassthroughImpl::Handle%(name)s( uint32_t immediate_data_size, const volatile void* cmd_data) { """ % {'name': func.name}) if func.IsES3(): f.write("""if (!feature_info_->IsWebGL2OrES3OrHigherContex...
[ "def", "WritePassthroughServiceFunctionHeader", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"\"\"error::Error GLES2DecoderPassthroughImpl::Handle%(name)s(\n uint32_t immediate_data_size, const volatile void* cmd_data) {\n \"\"\"", "%", "{", "...
Writes function header for service passthrough handlers.
[ "Writes", "function", "header", "for", "service", "passthrough", "handlers", "." ]
[ "\"\"\"Writes function header for service passthrough handlers.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WritePassthroughServiceFunctionDoerCall
null
def WritePassthroughServiceFunctionDoerCall(self, func, f): """Writes the function call to the passthrough service doer.""" f.write(""" error::Error error = Do%(name)s(%(args)s); if (error != error::kNoError) { return error; }""" % {'name': func.original_name, 'args': func.MakePassthroughServ...
Writes the function call to the passthrough service doer.
Writes the function call to the passthrough service doer.
[ "Writes", "the", "function", "call", "to", "the", "passthrough", "service", "doer", "." ]
def WritePassthroughServiceFunctionDoerCall(self, func, f): f.write(""" error::Error error = Do%(name)s(%(args)s); if (error != error::kNoError) { return error; }""" % {'name': func.original_name, 'args': func.MakePassthroughServiceDoerArgString("")})
[ "def", "WritePassthroughServiceFunctionDoerCall", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"\"\" error::Error error = Do%(name)s(%(args)s);\n if (error != error::kNoError) {\n return error;\n }\"\"\"", "%", "{", "'name'", ":", "func", ".",...
Writes the function call to the passthrough service doer.
[ "Writes", "the", "function", "call", "to", "the", "passthrough", "service", "doer", "." ]
[ "\"\"\"Writes the function call to the passthrough service doer.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WritePassthroughServiceImplementation
null
def WritePassthroughServiceImplementation(self, func, f): """Writes the service implementation for a command.""" self.WritePassthroughServiceFunctionHeader(func, f) self.WriteHandlerExtensionCheck(func, f) self.WriteServiceHandlerArgGetCode(func, f) func.WritePassthroughHandlerValidation(f) self...
Writes the service implementation for a command.
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
def WritePassthroughServiceImplementation(self, func, f): self.WritePassthroughServiceFunctionHeader(func, f) self.WriteHandlerExtensionCheck(func, f) self.WriteServiceHandlerArgGetCode(func, f) func.WritePassthroughHandlerValidation(f) self.WritePassthroughServiceFunctionDoerCall(func, f) f.wri...
[ "def", "WritePassthroughServiceImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "self", ".", "WritePassthroughServiceFunctionHeader", "(", "func", ",", "f", ")", "self", ".", "WriteHandlerExtensionCheck", "(", "func", ",", "f", ")", "self", ".", ...
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
[ "\"\"\"Writes the service implementation for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WritePassthroughImmediateServiceImplementation
null
def WritePassthroughImmediateServiceImplementation(self, func, f): """Writes the service implementation for a command.""" self.WritePassthroughServiceFunctionHeader(func, f) self.WriteHandlerExtensionCheck(func, f) self.WriteImmediateServiceHandlerArgGetCode(func, f) func.WritePassthroughHandlerVali...
Writes the service implementation for a command.
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
def WritePassthroughImmediateServiceImplementation(self, func, f): self.WritePassthroughServiceFunctionHeader(func, f) self.WriteHandlerExtensionCheck(func, f) self.WriteImmediateServiceHandlerArgGetCode(func, f) func.WritePassthroughHandlerValidation(f) self.WritePassthroughServiceFunctionDoerCall(...
[ "def", "WritePassthroughImmediateServiceImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "self", ".", "WritePassthroughServiceFunctionHeader", "(", "func", ",", "f", ")", "self", ".", "WriteHandlerExtensionCheck", "(", "func", ",", "f", ")", "self", ...
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
[ "\"\"\"Writes the service implementation for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WritePassthroughBucketServiceImplementation
null
def WritePassthroughBucketServiceImplementation(self, func, f): """Writes the service implementation for a command.""" self.WritePassthroughServiceFunctionHeader(func, f) self.WriteHandlerExtensionCheck(func, f) self.WriteBucketServiceHandlerArgGetCode(func, f) func.WritePassthroughHandlerValidation...
Writes the service implementation for a command.
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
def WritePassthroughBucketServiceImplementation(self, func, f): self.WritePassthroughServiceFunctionHeader(func, f) self.WriteHandlerExtensionCheck(func, f) self.WriteBucketServiceHandlerArgGetCode(func, f) func.WritePassthroughHandlerValidation(f) self.WritePassthroughServiceFunctionDoerCall(func, ...
[ "def", "WritePassthroughBucketServiceImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "self", ".", "WritePassthroughServiceFunctionHeader", "(", "func", ",", "f", ")", "self", ".", "WriteHandlerExtensionCheck", "(", "func", ",", "f", ")", "self", "...
Writes the service implementation for a command.
[ "Writes", "the", "service", "implementation", "for", "a", "command", "." ]
[ "\"\"\"Writes the service implementation for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteHandlerDeferReadWrite
null
def WriteHandlerDeferReadWrite(self, func, f): """Writes the code to handle deferring reads or writes.""" defer_draws = func.GetInfo('defer_draws') defer_reads = func.GetInfo('defer_reads') if defer_draws or defer_reads: f.write(" error::Error error;\n") if defer_draws: f.write(" error...
Writes the code to handle deferring reads or writes.
Writes the code to handle deferring reads or writes.
[ "Writes", "the", "code", "to", "handle", "deferring", "reads", "or", "writes", "." ]
def WriteHandlerDeferReadWrite(self, func, f): defer_draws = func.GetInfo('defer_draws') defer_reads = func.GetInfo('defer_reads') if defer_draws or defer_reads: f.write(" error::Error error;\n") if defer_draws: f.write(" error = WillAccessBoundFramebufferForDraw();\n") f.write(" if...
[ "def", "WriteHandlerDeferReadWrite", "(", "self", ",", "func", ",", "f", ")", ":", "defer_draws", "=", "func", ".", "GetInfo", "(", "'defer_draws'", ")", "defer_reads", "=", "func", ".", "GetInfo", "(", "'defer_reads'", ")", "if", "defer_draws", "or", "defer...
Writes the code to handle deferring reads or writes.
[ "Writes", "the", "code", "to", "handle", "deferring", "reads", "or", "writes", "." ]
[ "\"\"\"Writes the code to handle deferring reads or writes.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteValidUnitTest
null
def WriteValidUnitTest(self, func, f, test, *extras): """Writes a valid unit test for the service implementation.""" if not func.GetInfo('expectation', True): test = self._remove_expected_call_re.sub('', test) name = func.name arg_strings = [ arg.GetValidArg(func) \ for arg in func.Get...
Writes a valid unit test for the service implementation.
Writes a valid unit test for the service implementation.
[ "Writes", "a", "valid", "unit", "test", "for", "the", "service", "implementation", "." ]
def WriteValidUnitTest(self, func, f, test, *extras): if not func.GetInfo('expectation', True): test = self._remove_expected_call_re.sub('', test) name = func.name arg_strings = [ arg.GetValidArg(func) \ for arg in func.GetOriginalArgs() if not arg.IsConstant() ] gl_arg_strings = [...
[ "def", "WriteValidUnitTest", "(", "self", ",", "func", ",", "f", ",", "test", ",", "*", "extras", ")", ":", "if", "not", "func", ".", "GetInfo", "(", "'expectation'", ",", "True", ")", ":", "test", "=", "self", ".", "_remove_expected_call_re", ".", "su...
Writes a valid unit test for the service implementation.
[ "Writes", "a", "valid", "unit", "test", "for", "the", "service", "implementation", "." ]
[ "\"\"\"Writes a valid unit test for the service implementation.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null }, { "param": "test", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteInvalidUnitTest
<not_specific>
def WriteInvalidUnitTest(self, func, f, test, *extras): """Writes an invalid unit test for the service implementation.""" if func.IsES3(): return for invalid_arg_index, invalid_arg in enumerate(func.GetOriginalArgs()): # Service implementation does not test constants, as they are not part of ...
Writes an invalid unit test for the service implementation.
Writes an invalid unit test for the service implementation.
[ "Writes", "an", "invalid", "unit", "test", "for", "the", "service", "implementation", "." ]
def WriteInvalidUnitTest(self, func, f, test, *extras): if func.IsES3(): return for invalid_arg_index, invalid_arg in enumerate(func.GetOriginalArgs()): if invalid_arg.IsConstant(): continue num_invalid_values = invalid_arg.GetNumInvalidValues(func) for value_index in range(0, nu...
[ "def", "WriteInvalidUnitTest", "(", "self", ",", "func", ",", "f", ",", "test", ",", "*", "extras", ")", ":", "if", "func", ".", "IsES3", "(", ")", ":", "return", "for", "invalid_arg_index", ",", "invalid_arg", "in", "enumerate", "(", "func", ".", "Get...
Writes an invalid unit test for the service implementation.
[ "Writes", "an", "invalid", "unit", "test", "for", "the", "service", "implementation", "." ]
[ "\"\"\"Writes an invalid unit test for the service implementation.\"\"\"", "# Service implementation does not test constants, as they are not part of", "# the call in the service side." ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null }, { "param": "test", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceUnitTest
null
def WriteServiceUnitTest(self, func, f, *extras): """Writes the service unit test for a command.""" if func.name == 'Enable': valid_test = """ TEST_P(%(test_name)s, %(name)sValidArgs) { SetupExpectationsForEnableDisable(%(gl_args)s, true); SpecializedSetup<cmds::%(name)s, 0>(true); cmds::%(name)s c...
Writes the service unit test for a command.
Writes the service unit test for a command.
[ "Writes", "the", "service", "unit", "test", "for", "a", "command", "." ]
def WriteServiceUnitTest(self, func, f, *extras): if func.name == 'Enable': valid_test = """ TEST_P(%(test_name)s, %(name)sValidArgs) { SetupExpectationsForEnableDisable(%(gl_args)s, true); SpecializedSetup<cmds::%(name)s, 0>(true); cmds::%(name)s cmd; cmd.Init(%(args)s);""" elif func.name == 'Dis...
[ "def", "WriteServiceUnitTest", "(", "self", ",", "func", ",", "f", ",", "*", "extras", ")", ":", "if", "func", ".", "name", "==", "'Enable'", ":", "valid_test", "=", "\"\"\"\nTEST_P(%(test_name)s, %(name)sValidArgs) {\n SetupExpectationsForEnableDisable(%(gl_args)s, true...
Writes the service unit test for a command.
[ "Writes", "the", "service", "unit", "test", "for", "a", "command", "." ]
[ "\"\"\"Writes the service unit test for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2ImplementationDeclaration
null
def WriteGLES2ImplementationDeclaration(self, func, f): """Writes the GLES2 Implemention declaration.""" f.write("%s %s(%s) override;\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString("", add_default = True))) f.write("\n")
Writes the GLES2 Implemention declaration.
Writes the GLES2 Implemention declaration.
[ "Writes", "the", "GLES2", "Implemention", "declaration", "." ]
def WriteGLES2ImplementationDeclaration(self, func, f): f.write("%s %s(%s) override;\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString("", add_default = True))) f.write("\n")
[ "def", "WriteGLES2ImplementationDeclaration", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"%s %s(%s) override;\\n\"", "%", "(", "func", ".", "return_type", ",", "func", ".", "original_name", ",", "func", ".", "MakeTypedOriginalArgStri...
Writes the GLES2 Implemention declaration.
[ "Writes", "the", "GLES2", "Implemention", "declaration", "." ]
[ "\"\"\"Writes the GLES2 Implemention declaration.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteClientGLCallLog
null
def WriteClientGLCallLog(self, func, f): """Writes a logging macro for the client side code.""" comma = "" if len(func.GetOriginalArgs()): comma = " << " f.write( ' GPU_CLIENT_LOG("[" << GetLogPrefix() << "] %s("%s%s << ")");\n' % (func.prefixed_name, comma, func.MakeLogArgString(...
Writes a logging macro for the client side code.
Writes a logging macro for the client side code.
[ "Writes", "a", "logging", "macro", "for", "the", "client", "side", "code", "." ]
def WriteClientGLCallLog(self, func, f): comma = "" if len(func.GetOriginalArgs()): comma = " << " f.write( ' GPU_CLIENT_LOG("[" << GetLogPrefix() << "] %s("%s%s << ")");\n' % (func.prefixed_name, comma, func.MakeLogArgString()))
[ "def", "WriteClientGLCallLog", "(", "self", ",", "func", ",", "f", ")", ":", "comma", "=", "\"\"", "if", "len", "(", "func", ".", "GetOriginalArgs", "(", ")", ")", ":", "comma", "=", "\" << \"", "f", ".", "write", "(", "' GPU_CLIENT_LOG(\"[\" << GetLogPre...
Writes a logging macro for the client side code.
[ "Writes", "a", "logging", "macro", "for", "the", "client", "side", "code", "." ]
[ "\"\"\"Writes a logging macro for the client side code.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2TraceImplementationHeader
null
def WriteGLES2TraceImplementationHeader(self, func, f): """Writes the GLES2 Trace Implemention header.""" f.write("%s %s(%s) override;\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString("")))
Writes the GLES2 Trace Implemention header.
Writes the GLES2 Trace Implemention header.
[ "Writes", "the", "GLES2", "Trace", "Implemention", "header", "." ]
def WriteGLES2TraceImplementationHeader(self, func, f): f.write("%s %s(%s) override;\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString("")))
[ "def", "WriteGLES2TraceImplementationHeader", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"%s %s(%s) override;\\n\"", "%", "(", "func", ".", "return_type", ",", "func", ".", "original_name", ",", "func", ".", "MakeTypedOriginalArgStri...
Writes the GLES2 Trace Implemention header.
[ "Writes", "the", "GLES2", "Trace", "Implemention", "header", "." ]
[ "\"\"\"Writes the GLES2 Trace Implemention header.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2TraceImplementation
null
def WriteGLES2TraceImplementation(self, func, f): """Writes the GLES2 Trace Implemention.""" f.write("%s GLES2TraceImplementation::%s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) result_string = "return " if func.return_type == "v...
Writes the GLES2 Trace Implemention.
Writes the GLES2 Trace Implemention.
[ "Writes", "the", "GLES2", "Trace", "Implemention", "." ]
def WriteGLES2TraceImplementation(self, func, f): f.write("%s GLES2TraceImplementation::%s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) result_string = "return " if func.return_type == "void": result_string = "" f.write(' T...
[ "def", "WriteGLES2TraceImplementation", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"%s GLES2TraceImplementation::%s(%s) {\\n\"", "%", "(", "func", ".", "return_type", ",", "func", ".", "original_name", ",", "func", ".", "MakeTypedOri...
Writes the GLES2 Trace Implemention.
[ "Writes", "the", "GLES2", "Trace", "Implemention", "." ]
[ "\"\"\"Writes the GLES2 Trace Implemention.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2InterfaceStub
null
def WriteGLES2InterfaceStub(self, func, f): """Writes the GLES2 Interface stub declaration.""" f.write("%s %s(%s) override;\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString("")))
Writes the GLES2 Interface stub declaration.
Writes the GLES2 Interface stub declaration.
[ "Writes", "the", "GLES2", "Interface", "stub", "declaration", "." ]
def WriteGLES2InterfaceStub(self, func, f): f.write("%s %s(%s) override;\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString("")))
[ "def", "WriteGLES2InterfaceStub", "(", "self", ",", "func", ",", "f", ")", ":", "f", ".", "write", "(", "\"%s %s(%s) override;\\n\"", "%", "(", "func", ".", "return_type", ",", "func", ".", "original_name", ",", "func", ".", "MakeTypedOriginalArgString", "(", ...
Writes the GLES2 Interface stub declaration.
[ "Writes", "the", "GLES2", "Interface", "stub", "declaration", "." ]
[ "\"\"\"Writes the GLES2 Interface stub declaration.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2InterfaceStubImpl
null
def WriteGLES2InterfaceStubImpl(self, func, f): """Writes the GLES2 Interface stub declaration.""" args = func.GetOriginalArgs() arg_string = ", ".join( ["%s /* %s */" % (arg.type, arg.name) for arg in args]) f.write("%s %sInterfaceStub::%s(%s) {\n" % (func.return_type, _prefix, f...
Writes the GLES2 Interface stub declaration.
Writes the GLES2 Interface stub declaration.
[ "Writes", "the", "GLES2", "Interface", "stub", "declaration", "." ]
def WriteGLES2InterfaceStubImpl(self, func, f): args = func.GetOriginalArgs() arg_string = ", ".join( ["%s /* %s */" % (arg.type, arg.name) for arg in args]) f.write("%s %sInterfaceStub::%s(%s) {\n" % (func.return_type, _prefix, func.original_name, arg_string)) if func.return_type...
[ "def", "WriteGLES2InterfaceStubImpl", "(", "self", ",", "func", ",", "f", ")", ":", "args", "=", "func", ".", "GetOriginalArgs", "(", ")", "arg_string", "=", "\", \"", ".", "join", "(", "[", "\"%s /* %s */\"", "%", "(", "arg", ".", "type", ",", "arg", ...
Writes the GLES2 Interface stub declaration.
[ "Writes", "the", "GLES2", "Interface", "stub", "declaration", "." ]
[ "\"\"\"Writes the GLES2 Interface stub declaration.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2ImplementationUnitTest
null
def WriteGLES2ImplementationUnitTest(self, func, f): """Writes the GLES2 Implemention unit test.""" client_test = func.GetInfo('client_test', True) if func.can_auto_generate and client_test: code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { struct Cmds { cmds::%(name)s cmd; }; Cmds...
Writes the GLES2 Implemention unit test.
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
def WriteGLES2ImplementationUnitTest(self, func, f): client_test = func.GetInfo('client_test', True) if func.can_auto_generate and client_test: code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { struct Cmds { cmds::%(name)s cmd; }; Cmds expected; expected.cmd.Init(%(cmd_args)s); gl_...
[ "def", "WriteGLES2ImplementationUnitTest", "(", "self", ",", "func", ",", "f", ")", ":", "client_test", "=", "func", ".", "GetInfo", "(", "'client_test'", ",", "True", ")", "if", "func", ".", "can_auto_generate", "and", "client_test", ":", "code", "=", "\"\"...
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
[ "\"\"\"Writes the GLES2 Implemention unit test.\"\"\"", "# Test constants for invalid values, as they are not tested by the", "# service." ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteImmediateCmdComputeSize
null
def WriteImmediateCmdComputeSize(self, _func, f): """Writes the size computation code for the immediate version of a cmd.""" f.write(" static uint32_t ComputeSize(uint32_t size_in_bytes) {\n") f.write(" return static_cast<uint32_t>(\n") f.write(" sizeof(ValueType) + // NOLINT\n") f.write...
Writes the size computation code for the immediate version of a cmd.
Writes the size computation code for the immediate version of a cmd.
[ "Writes", "the", "size", "computation", "code", "for", "the", "immediate", "version", "of", "a", "cmd", "." ]
def WriteImmediateCmdComputeSize(self, _func, f): f.write(" static uint32_t ComputeSize(uint32_t size_in_bytes) {\n") f.write(" return static_cast<uint32_t>(\n") f.write(" sizeof(ValueType) + // NOLINT\n") f.write(" RoundSizeToMultipleOfEntries(size_in_bytes));\n") f.write(" }\n"...
[ "def", "WriteImmediateCmdComputeSize", "(", "self", ",", "_func", ",", "f", ")", ":", "f", ".", "write", "(", "\" static uint32_t ComputeSize(uint32_t size_in_bytes) {\\n\"", ")", "f", ".", "write", "(", "\" return static_cast<uint32_t>(\\n\"", ")", "f", ".", "wri...
Writes the size computation code for the immediate version of a cmd.
[ "Writes", "the", "size", "computation", "code", "for", "the", "immediate", "version", "of", "a", "cmd", "." ]
[ "\"\"\"Writes the size computation code for the immediate version of a cmd.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "_func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "_func", "type": null, "docstring": null, "docstring_tokens": ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteImmediateCmdSetHeader
null
def WriteImmediateCmdSetHeader(self, _func, f): """Writes the SetHeader function for the immediate version of a cmd.""" f.write(" void SetHeader(uint32_t size_in_bytes) {\n") f.write(" header.SetCmdByTotalSize<ValueType>(size_in_bytes);\n") f.write(" }\n") f.write("\n")
Writes the SetHeader function for the immediate version of a cmd.
Writes the SetHeader function for the immediate version of a cmd.
[ "Writes", "the", "SetHeader", "function", "for", "the", "immediate", "version", "of", "a", "cmd", "." ]
def WriteImmediateCmdSetHeader(self, _func, f): f.write(" void SetHeader(uint32_t size_in_bytes) {\n") f.write(" header.SetCmdByTotalSize<ValueType>(size_in_bytes);\n") f.write(" }\n") f.write("\n")
[ "def", "WriteImmediateCmdSetHeader", "(", "self", ",", "_func", ",", "f", ")", ":", "f", ".", "write", "(", "\" void SetHeader(uint32_t size_in_bytes) {\\n\"", ")", "f", ".", "write", "(", "\" header.SetCmdByTotalSize<ValueType>(size_in_bytes);\\n\"", ")", "f", ".",...
Writes the SetHeader function for the immediate version of a cmd.
[ "Writes", "the", "SetHeader", "function", "for", "the", "immediate", "version", "of", "a", "cmd", "." ]
[ "\"\"\"Writes the SetHeader function for the immediate version of a cmd.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "_func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "_func", "type": null, "docstring": null, "docstring_tokens": ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteCmdHelper
null
def WriteCmdHelper(self, func, f): """Writes the cmd helper definition for a cmd.""" code = """ void %(name)s(%(typed_args)s) { %(lp)s::cmds::%(name)s* c = GetCmdSpace<%(lp)s::cmds::%(name)s>(); if (c) { c->Init(%(args)s); } } """ f.write(code % { "lp" : _lower_prefix, ...
Writes the cmd helper definition for a cmd.
Writes the cmd helper definition for a cmd.
[ "Writes", "the", "cmd", "helper", "definition", "for", "a", "cmd", "." ]
def WriteCmdHelper(self, func, f): code = """ void %(name)s(%(typed_args)s) { %(lp)s::cmds::%(name)s* c = GetCmdSpace<%(lp)s::cmds::%(name)s>(); if (c) { c->Init(%(args)s); } } """ f.write(code % { "lp" : _lower_prefix, "name": func.name, "typed_args": func.Mak...
[ "def", "WriteCmdHelper", "(", "self", ",", "func", ",", "f", ")", ":", "code", "=", "\"\"\" void %(name)s(%(typed_args)s) {\n %(lp)s::cmds::%(name)s* c = GetCmdSpace<%(lp)s::cmds::%(name)s>();\n if (c) {\n c->Init(%(args)s);\n }\n }\n\n\"\"\"", "f", ".", "write", "(",...
Writes the cmd helper definition for a cmd.
[ "Writes", "the", "cmd", "helper", "definition", "for", "a", "cmd", "." ]
[ "\"\"\"Writes the cmd helper definition for a cmd.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteImmediateCmdHelper
null
def WriteImmediateCmdHelper(self, func, f): """Writes the cmd helper definition for the immediate version of a cmd.""" code = """ void %(name)s(%(typed_args)s) { const uint32_t s = 0; %(lp)s::cmds::%(name)s* c = GetImmediateCmdSpaceTotalSize<%(lp)s::cmds::%(name)s>(s); if (c) { c->Ini...
Writes the cmd helper definition for the immediate version of a cmd.
Writes the cmd helper definition for the immediate version of a cmd.
[ "Writes", "the", "cmd", "helper", "definition", "for", "the", "immediate", "version", "of", "a", "cmd", "." ]
def WriteImmediateCmdHelper(self, func, f): code = """ void %(name)s(%(typed_args)s) { const uint32_t s = 0; %(lp)s::cmds::%(name)s* c = GetImmediateCmdSpaceTotalSize<%(lp)s::cmds::%(name)s>(s); if (c) { c->Init(%(args)s); } } """ f.write(code % { "lp" : _lower_prefix...
[ "def", "WriteImmediateCmdHelper", "(", "self", ",", "func", ",", "f", ")", ":", "code", "=", "\"\"\" void %(name)s(%(typed_args)s) {\n const uint32_t s = 0;\n %(lp)s::cmds::%(name)s* c =\n GetImmediateCmdSpaceTotalSize<%(lp)s::cmds::%(name)s>(s);\n if (c) {\n c->Init(%(...
Writes the cmd helper definition for the immediate version of a cmd.
[ "Writes", "the", "cmd", "helper", "definition", "for", "the", "immediate", "version", "of", "a", "cmd", "." ]
[ "\"\"\"Writes the cmd helper definition for the immediate version of a cmd.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2ImplementationUnitTest
<not_specific>
def WriteGLES2ImplementationUnitTest(self, func, f): """Writes the GLES2 Implemention unit test.""" code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { struct Cmds { cmds::%(name)s cmd; }; typedef cmds::%(name)s::Result::Type ResultType; ResultType result = 0; Cmds expected; ExpectedMemo...
Writes the GLES2 Implemention unit test.
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
def WriteGLES2ImplementationUnitTest(self, func, f): code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { struct Cmds { cmds::%(name)s cmd; }; typedef cmds::%(name)s::Result::Type ResultType; ResultType result = 0; Cmds expected; ExpectedMemoryInfo result1 = GetExpectedResultMemory( siz...
[ "def", "WriteGLES2ImplementationUnitTest", "(", "self", ",", "func", ",", "f", ")", ":", "code", "=", "\"\"\"\nTEST_F(%(prefix)sImplementationTest, %(name)s) {\n struct Cmds {\n cmds::%(name)s cmd;\n };\n typedef cmds::%(name)s::Result::Type ResultType;\n ResultType result = 0;\n Cmd...
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
[ "\"\"\"Writes the GLES2 Implemention unit test.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceUnitTest
null
def WriteServiceUnitTest(self, func, f, *extras): """Writes the service unit test for a command.""" expected_call = "EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s));" if func.GetInfo("first_element_only"): gl_arg_strings = [ arg.GetValidGLArg(func) for arg in func.GetOriginalArgs() ] ...
Writes the service unit test for a command.
Writes the service unit test for a command.
[ "Writes", "the", "service", "unit", "test", "for", "a", "command", "." ]
def WriteServiceUnitTest(self, func, f, *extras): expected_call = "EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s));" if func.GetInfo("first_element_only"): gl_arg_strings = [ arg.GetValidGLArg(func) for arg in func.GetOriginalArgs() ] gl_arg_strings[-1] = "*" + gl_arg_strings[-1] ...
[ "def", "WriteServiceUnitTest", "(", "self", ",", "func", ",", "f", ",", "*", "extras", ")", ":", "expected_call", "=", "\"EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s));\"", "if", "func", ".", "GetInfo", "(", "\"first_element_only\"", ")", ":", "gl_arg_strings", "...
Writes the service unit test for a command.
[ "Writes", "the", "service", "unit", "test", "for", "a", "command", "." ]
[ "\"\"\"Writes the service unit test for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteImmediateServiceUnitTest
null
def WriteImmediateServiceUnitTest(self, func, f, *extras): """Writes the service unit test for a command.""" valid_test = """ TEST_P(%(test_name)s, %(name)sValidArgs) { cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); SpecializedSetup<cmds::%(name)s, 0>(true); %(data_type)s temp[%(data_count)s] = ...
Writes the service unit test for a command.
Writes the service unit test for a command.
[ "Writes", "the", "service", "unit", "test", "for", "a", "command", "." ]
def WriteImmediateServiceUnitTest(self, func, f, *extras): valid_test = """ TEST_P(%(test_name)s, %(name)sValidArgs) { cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); SpecializedSetup<cmds::%(name)s, 0>(true); %(data_type)s temp[%(data_count)s] = { %(data_value)s, }; cmd.Init(%(gl_client_args)s, &t...
[ "def", "WriteImmediateServiceUnitTest", "(", "self", ",", "func", ",", "f", ",", "*", "extras", ")", ":", "valid_test", "=", "\"\"\"\nTEST_P(%(test_name)s, %(name)sValidArgs) {\n cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>();\n SpecializedSetup<cmds::%(name)s, 0>(true);\n ...
Writes the service unit test for a command.
[ "Writes", "the", "service", "unit", "test", "for", "a", "command", "." ]
[ "\"\"\"Writes the service unit test for a command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2ImplementationUnitTest
<not_specific>
def WriteGLES2ImplementationUnitTest(self, func, f): """Writes the GLES2 Implemention unit test.""" client_test = func.GetInfo('client_test', True) if not client_test: return; code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { %(type)s data[%(count)d] = {0}; struct Cmds { cmds::%(...
Writes the GLES2 Implemention unit test.
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
def WriteGLES2ImplementationUnitTest(self, func, f): client_test = func.GetInfo('client_test', True) if not client_test: return; code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { %(type)s data[%(count)d] = {0}; struct Cmds { cmds::%(name)sImmediate cmd; %(type)s data[%(count)d]; ...
[ "def", "WriteGLES2ImplementationUnitTest", "(", "self", ",", "func", ",", "f", ")", ":", "client_test", "=", "func", ".", "GetInfo", "(", "'client_test'", ",", "True", ")", "if", "not", "client_test", ":", "return", ";", "code", "=", "\"\"\"\nTEST_F(%(prefix)s...
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
[ "\"\"\"Writes the GLES2 Implemention unit test.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2ImplementationUnitTest
<not_specific>
def WriteGLES2ImplementationUnitTest(self, func, f): """Writes the GLES2 Implemention unit test.""" client_test = func.GetInfo('client_test', True) if not client_test: return; code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { %(type)s data[%(count_param)d][%(count)d] = {{0}}; struct...
Writes the GLES2 Implemention unit test.
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
def WriteGLES2ImplementationUnitTest(self, func, f): client_test = func.GetInfo('client_test', True) if not client_test: return; code = """ TEST_F(%(prefix)sImplementationTest, %(name)s) { %(type)s data[%(count_param)d][%(count)d] = {{0}}; struct Cmds { cmds::%(name)sImmediate cmd; %(type)...
[ "def", "WriteGLES2ImplementationUnitTest", "(", "self", ",", "func", ",", "f", ")", ":", "client_test", "=", "func", ".", "GetInfo", "(", "'client_test'", ",", "True", ")", "if", "not", "client_test", ":", "return", ";", "code", "=", "\"\"\"\nTEST_F(%(prefix)s...
Writes the GLES2 Implemention unit test.
[ "Writes", "the", "GLES2", "Implemention", "unit", "test", "." ]
[ "\"\"\"Writes the GLES2 Implemention unit test.\"\"\"", "# Test constants for invalid values, as they are not tested by the", "# service." ]
[ { "param": "self", "type": null }, { "param": "func", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetValidNonCachedClientSideArg
<not_specific>
def GetValidNonCachedClientSideArg(self, _func): """Returns a valid value for this argument in a GL call. Using the value will produce a command buffer service invocation. Returns None if there is no such value.""" value = '123' if self.type == 'GLsync': return ("reinterpret_cast<GLsync>(%s)" ...
Returns a valid value for this argument in a GL call. Using the value will produce a command buffer service invocation. Returns None if there is no such value.
Returns a valid value for this argument in a GL call. Using the value will produce a command buffer service invocation. Returns None if there is no such value.
[ "Returns", "a", "valid", "value", "for", "this", "argument", "in", "a", "GL", "call", ".", "Using", "the", "value", "will", "produce", "a", "command", "buffer", "service", "invocation", ".", "Returns", "None", "if", "there", "is", "no", "such", "value", ...
def GetValidNonCachedClientSideArg(self, _func): value = '123' if self.type == 'GLsync': return ("reinterpret_cast<GLsync>(%s)" % value) return value
[ "def", "GetValidNonCachedClientSideArg", "(", "self", ",", "_func", ")", ":", "value", "=", "'123'", "if", "self", ".", "type", "==", "'GLsync'", ":", "return", "(", "\"reinterpret_cast<GLsync>(%s)\"", "%", "value", ")", "return", "value" ]
Returns a valid value for this argument in a GL call.
[ "Returns", "a", "valid", "value", "for", "this", "argument", "in", "a", "GL", "call", "." ]
[ "\"\"\"Returns a valid value for this argument in a GL call.\n Using the value will produce a command buffer service invocation.\n Returns None if there is no such value.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "_func", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "_func", "type": null, "docstring": null, "docstring_tokens": ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetValidNonCachedClientSideCmdArg
<not_specific>
def GetValidNonCachedClientSideCmdArg(self, _func): """Returns a valid value for this argument in a command buffer command. Calling the GL function with the value returned by GetValidNonCachedClientSideArg will result in a command buffer command that contains the value returned by this function. """ ...
Returns a valid value for this argument in a command buffer command. Calling the GL function with the value returned by GetValidNonCachedClientSideArg will result in a command buffer command that contains the value returned by this function.
Returns a valid value for this argument in a command buffer command. Calling the GL function with the value returned by GetValidNonCachedClientSideArg will result in a command buffer command that contains the value returned by this function.
[ "Returns", "a", "valid", "value", "for", "this", "argument", "in", "a", "command", "buffer", "command", ".", "Calling", "the", "GL", "function", "with", "the", "value", "returned", "by", "GetValidNonCachedClientSideArg", "will", "result", "in", "a", "command", ...
def GetValidNonCachedClientSideCmdArg(self, _func): return '123'
[ "def", "GetValidNonCachedClientSideCmdArg", "(", "self", ",", "_func", ")", ":", "return", "'123'" ]
Returns a valid value for this argument in a command buffer command.
[ "Returns", "a", "valid", "value", "for", "this", "argument", "in", "a", "command", "buffer", "command", "." ]
[ "\"\"\"Returns a valid value for this argument in a command buffer command.\n Calling the GL function with the value returned by\n GetValidNonCachedClientSideArg will result in a command buffer command\n that contains the value returned by this function. \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "_func", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "_func", "type": null, "docstring": null, "docstring_tokens": ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetLogArg
<not_specific>
def GetLogArg(self): """Get argument appropriate for LOG macro.""" if self.type == 'GLboolean': return '%sGLES2Util::GetStringBool(%s)' % (_Namespace(), self.name) if self.type == 'GLenum': return '%sGLES2Util::GetStringEnum(%s)' % (_Namespace(), self.name) return self.name
Get argument appropriate for LOG macro.
Get argument appropriate for LOG macro.
[ "Get", "argument", "appropriate", "for", "LOG", "macro", "." ]
def GetLogArg(self): if self.type == 'GLboolean': return '%sGLES2Util::GetStringBool(%s)' % (_Namespace(), self.name) if self.type == 'GLenum': return '%sGLES2Util::GetStringEnum(%s)' % (_Namespace(), self.name) return self.name
[ "def", "GetLogArg", "(", "self", ")", ":", "if", "self", ".", "type", "==", "'GLboolean'", ":", "return", "'%sGLES2Util::GetStringBool(%s)'", "%", "(", "_Namespace", "(", ")", ",", "self", ".", "name", ")", "if", "self", ".", "type", "==", "'GLenum'", ":...
Get argument appropriate for LOG macro.
[ "Get", "argument", "appropriate", "for", "LOG", "macro", "." ]
[ "\"\"\"Get argument appropriate for LOG macro.\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGetCode
null
def WriteGetCode(self, f): """Writes the code to get an argument from a command structure.""" if self.type == 'GLsync': my_type = 'GLuint' else: my_type = self.type f.write(" %s %s = static_cast<%s>(c.%s);\n" % (my_type, self.name, my_type, self.name))
Writes the code to get an argument from a command structure.
Writes the code to get an argument from a command structure.
[ "Writes", "the", "code", "to", "get", "an", "argument", "from", "a", "command", "structure", "." ]
def WriteGetCode(self, f): if self.type == 'GLsync': my_type = 'GLuint' else: my_type = self.type f.write(" %s %s = static_cast<%s>(c.%s);\n" % (my_type, self.name, my_type, self.name))
[ "def", "WriteGetCode", "(", "self", ",", "f", ")", ":", "if", "self", ".", "type", "==", "'GLsync'", ":", "my_type", "=", "'GLuint'", "else", ":", "my_type", "=", "self", ".", "type", "f", ".", "write", "(", "\" %s %s = static_cast<%s>(c.%s);\\n\"", "%", ...
Writes the code to get an argument from a command structure.
[ "Writes", "the", "code", "to", "get", "an", "argument", "from", "a", "command", "structure", "." ]
[ "\"\"\"Writes the code to get an argument from a command structure.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteDestinationInitalizationValidatationIfNeeded
<not_specific>
def WriteDestinationInitalizationValidatationIfNeeded(self, f, _func): """Writes the client side destintion initialization validation if needed.""" parts = self.type.split(" ") if len(parts) > 1: return if parts[0] in self.need_validation_: f.write( " GPU_CLIENT_VALIDATE_DESTINATI...
Writes the client side destintion initialization validation if needed.
Writes the client side destintion initialization validation if needed.
[ "Writes", "the", "client", "side", "destintion", "initialization", "validation", "if", "needed", "." ]
def WriteDestinationInitalizationValidatationIfNeeded(self, f, _func): parts = self.type.split(" ") if len(parts) > 1: return if parts[0] in self.need_validation_: f.write( " GPU_CLIENT_VALIDATE_DESTINATION_%sINITALIZATION(%s, %s);\n" % ("OPTIONAL_" if self.optional else "",...
[ "def", "WriteDestinationInitalizationValidatationIfNeeded", "(", "self", ",", "f", ",", "_func", ")", ":", "parts", "=", "self", ".", "type", ".", "split", "(", "\" \"", ")", "if", "len", "(", "parts", ")", ">", "1", ":", "return", "if", "parts", "[", ...
Writes the client side destintion initialization validation if needed.
[ "Writes", "the", "client", "side", "destintion", "initialization", "validation", "if", "needed", "." ]
[ "\"\"\"Writes the client side destintion initialization validation if needed.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null }, { "param": "_func", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGetCode
null
def WriteGetCode(self, f): """Writes the code to get an argument from a command structure.""" code = """ %s %s = static_cast<%s>(c.%s); """ f.write(code % (self.type, self.name, self.type, self.name))
Writes the code to get an argument from a command structure.
Writes the code to get an argument from a command structure.
[ "Writes", "the", "code", "to", "get", "an", "argument", "from", "a", "command", "structure", "." ]
def WriteGetCode(self, f): code = """ %s %s = static_cast<%s>(c.%s); """ f.write(code % (self.type, self.name, self.type, self.name))
[ "def", "WriteGetCode", "(", "self", ",", "f", ")", ":", "code", "=", "\"\"\" %s %s = static_cast<%s>(c.%s);\n\"\"\"", "f", ".", "write", "(", "code", "%", "(", "self", ".", "type", ",", "self", ".", "name", ",", "self", ".", "type", ",", "self", ".", ...
Writes the code to get an argument from a command structure.
[ "Writes", "the", "code", "to", "get", "an", "argument", "from", "a", "command", "structure", "." ]
[ "\"\"\"Writes the code to get an argument from a command structure.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetValidClientSideCmdArg
<not_specific>
def GetValidClientSideCmdArg(self, func): """Gets a valid value for this argument.""" valid_arg = func.GetValidArg(self) if valid_arg != None: return valid_arg valid = self.named_type.GetValidValues() if valid: return valid[0] try: index = func.GetOriginalArgs().index(self) ...
Gets a valid value for this argument.
Gets a valid value for this argument.
[ "Gets", "a", "valid", "value", "for", "this", "argument", "." ]
def GetValidClientSideCmdArg(self, func): valid_arg = func.GetValidArg(self) if valid_arg != None: return valid_arg valid = self.named_type.GetValidValues() if valid: return valid[0] try: index = func.GetOriginalArgs().index(self) return str(index + 1) except ValueError: ...
[ "def", "GetValidClientSideCmdArg", "(", "self", ",", "func", ")", ":", "valid_arg", "=", "func", ".", "GetValidArg", "(", "self", ")", "if", "valid_arg", "!=", "None", ":", "return", "valid_arg", "valid", "=", "self", ".", "named_type", ".", "GetValidValues"...
Gets a valid value for this argument.
[ "Gets", "a", "valid", "value", "for", "this", "argument", "." ]
[ "\"\"\"Gets a valid value for this argument.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "func", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "func", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteArgAccessor
null
def WriteArgAccessor(self, f): """Writes specialized accessor for compound members.""" f.write(" %s %s() const volatile {\n" % (self.type, self.name)) f.write(" return static_cast<%s>(\n" % self.type) f.write(" %sGLES2Util::MapTwoUint32ToUint64(\n" % _Namespace()) f.write(" %s_...
Writes specialized accessor for compound members.
Writes specialized accessor for compound members.
[ "Writes", "specialized", "accessor", "for", "compound", "members", "." ]
def WriteArgAccessor(self, f): f.write(" %s %s() const volatile {\n" % (self.type, self.name)) f.write(" return static_cast<%s>(\n" % self.type) f.write(" %sGLES2Util::MapTwoUint32ToUint64(\n" % _Namespace()) f.write(" %s_0,\n" % self.name) f.write(" %s_1));\n" % sel...
[ "def", "WriteArgAccessor", "(", "self", ",", "f", ")", ":", "f", ".", "write", "(", "\" %s %s() const volatile {\\n\"", "%", "(", "self", ".", "type", ",", "self", ".", "name", ")", ")", "f", ".", "write", "(", "\" return static_cast<%s>(\\n\"", "%", "...
Writes specialized accessor for compound members.
[ "Writes", "specialized", "accessor", "for", "compound", "members", "." ]
[ "\"\"\"Writes specialized accessor for compound members.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
ParseArgs
<not_specific>
def ParseArgs(self, arg_string): """Parses a function arg string.""" args = [] parts = arg_string.split(',') for arg_string in parts: arg = CreateArg(arg_string, self.named_type_info) if arg: args.append(arg) return args
Parses a function arg string.
Parses a function arg string.
[ "Parses", "a", "function", "arg", "string", "." ]
def ParseArgs(self, arg_string): args = [] parts = arg_string.split(',') for arg_string in parts: arg = CreateArg(arg_string, self.named_type_info) if arg: args.append(arg) return args
[ "def", "ParseArgs", "(", "self", ",", "arg_string", ")", ":", "args", "=", "[", "]", "parts", "=", "arg_string", ".", "split", "(", "','", ")", "for", "arg_string", "in", "parts", ":", "arg", "=", "CreateArg", "(", "arg_string", ",", "self", ".", "na...
Parses a function arg string.
[ "Parses", "a", "function", "arg", "string", "." ]
[ "\"\"\"Parses a function arg string.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "arg_string", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "arg_string", "type": null, "docstring": null, "docstring_toke...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetGLFunctionName
<not_specific>
def GetGLFunctionName(self): """Gets the function to call to execute GL for this command.""" if self.GetInfo('decoder_func'): return self.GetInfo('decoder_func') return "api()->gl%sFn" % self.original_name
Gets the function to call to execute GL for this command.
Gets the function to call to execute GL for this command.
[ "Gets", "the", "function", "to", "call", "to", "execute", "GL", "for", "this", "command", "." ]
def GetGLFunctionName(self): if self.GetInfo('decoder_func'): return self.GetInfo('decoder_func') return "api()->gl%sFn" % self.original_name
[ "def", "GetGLFunctionName", "(", "self", ")", ":", "if", "self", ".", "GetInfo", "(", "'decoder_func'", ")", ":", "return", "self", ".", "GetInfo", "(", "'decoder_func'", ")", "return", "\"api()->gl%sFn\"", "%", "self", ".", "original_name" ]
Gets the function to call to execute GL for this command.
[ "Gets", "the", "function", "to", "call", "to", "execute", "GL", "for", "this", "command", "." ]
[ "\"\"\"Gets the function to call to execute GL for this command.\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
MakePassthroughServiceDoerArgString
<not_specific>
def MakePassthroughServiceDoerArgString(self, prefix, add_comma = False, separator = ", "): """Gets the list of arguments as they are in used by the passthrough service doer function.""" args = self.GetPassthroughServiceDoerArgs() arg_string = separator.join(...
Gets the list of arguments as they are in used by the passthrough service doer function.
Gets the list of arguments as they are in used by the passthrough service doer function.
[ "Gets", "the", "list", "of", "arguments", "as", "they", "are", "in", "used", "by", "the", "passthrough", "service", "doer", "function", "." ]
def MakePassthroughServiceDoerArgString(self, prefix, add_comma = False, separator = ", "): args = self.GetPassthroughServiceDoerArgs() arg_string = separator.join( ["%s%s" % (prefix, arg.name) for arg in args]) return self._MaybePrependComma(arg_string, add...
[ "def", "MakePassthroughServiceDoerArgString", "(", "self", ",", "prefix", ",", "add_comma", "=", "False", ",", "separator", "=", "\", \"", ")", ":", "args", "=", "self", ".", "GetPassthroughServiceDoerArgs", "(", ")", "arg_string", "=", "separator", ".", "join",...
Gets the list of arguments as they are in used by the passthrough service doer function.
[ "Gets", "the", "list", "of", "arguments", "as", "they", "are", "in", "used", "by", "the", "passthrough", "service", "doer", "function", "." ]
[ "\"\"\"Gets the list of arguments as they are in used by the passthrough\n service doer function.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "prefix", "type": null }, { "param": "add_comma", "type": null }, { "param": "separator", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "prefix", "type": null, "docstring": null, "docstring_tokens":...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteHandlerValidation
null
def WriteHandlerValidation(self, f): """Writes validation code for the function.""" for arg in self.GetOriginalArgs(): arg.WriteValidationCode(f, self) self.WriteValidationCode(f)
Writes validation code for the function.
Writes validation code for the function.
[ "Writes", "validation", "code", "for", "the", "function", "." ]
def WriteHandlerValidation(self, f): for arg in self.GetOriginalArgs(): arg.WriteValidationCode(f, self) self.WriteValidationCode(f)
[ "def", "WriteHandlerValidation", "(", "self", ",", "f", ")", ":", "for", "arg", "in", "self", ".", "GetOriginalArgs", "(", ")", ":", "arg", ".", "WriteValidationCode", "(", "f", ",", "self", ")", "self", ".", "WriteValidationCode", "(", "f", ")" ]
Writes validation code for the function.
[ "Writes", "validation", "code", "for", "the", "function", "." ]
[ "\"\"\"Writes validation code for the function.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteCmdFlag
null
def WriteCmdFlag(self, f): """Writes the cmd cmd_flags constant.""" # By default trace only at the highest level 3. trace_level = int(self.GetInfo('trace_level', default = 3)) if trace_level not in xrange(0, 4): raise KeyError("Unhandled trace_level: %d" % trace_level) cmd_flags = ('CMD_FLAG_...
Writes the cmd cmd_flags constant.
Writes the cmd cmd_flags constant.
[ "Writes", "the", "cmd", "cmd_flags", "constant", "." ]
def WriteCmdFlag(self, f): trace_level = int(self.GetInfo('trace_level', default = 3)) if trace_level not in xrange(0, 4): raise KeyError("Unhandled trace_level: %d" % trace_level) cmd_flags = ('CMD_FLAG_SET_TRACE_LEVEL(%d)' % trace_level) f.write(" static const uint8_t cmd_flags = %s;\n" % cmd_f...
[ "def", "WriteCmdFlag", "(", "self", ",", "f", ")", ":", "trace_level", "=", "int", "(", "self", ".", "GetInfo", "(", "'trace_level'", ",", "default", "=", "3", ")", ")", "if", "trace_level", "not", "in", "xrange", "(", "0", ",", "4", ")", ":", "rai...
Writes the cmd cmd_flags constant.
[ "Writes", "the", "cmd", "cmd_flags", "constant", "." ]
[ "\"\"\"Writes the cmd cmd_flags constant.\"\"\"", "# By default trace only at the highest level 3." ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteCmdComputeSize
null
def WriteCmdComputeSize(self, f): """Writes the ComputeSize function for the command.""" f.write(" static uint32_t ComputeSize() {\n") f.write( " return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT\n") f.write(" }\n") f.write("\n")
Writes the ComputeSize function for the command.
Writes the ComputeSize function for the command.
[ "Writes", "the", "ComputeSize", "function", "for", "the", "command", "." ]
def WriteCmdComputeSize(self, f): f.write(" static uint32_t ComputeSize() {\n") f.write( " return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT\n") f.write(" }\n") f.write("\n")
[ "def", "WriteCmdComputeSize", "(", "self", ",", "f", ")", ":", "f", ".", "write", "(", "\" static uint32_t ComputeSize() {\\n\"", ")", "f", ".", "write", "(", "\" return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT\\n\"", ")", "f", ".", "write", "(", "\" ...
Writes the ComputeSize function for the command.
[ "Writes", "the", "ComputeSize", "function", "for", "the", "command", "." ]
[ "\"\"\"Writes the ComputeSize function for the command.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteCmdSetHeader
null
def WriteCmdSetHeader(self, f): """Writes the cmd's SetHeader function.""" f.write(" void SetHeader() {\n") f.write(" header.SetCmd<ValueType>();\n") f.write(" }\n") f.write("\n")
Writes the cmd's SetHeader function.
Writes the cmd's SetHeader function.
[ "Writes", "the", "cmd", "'", "s", "SetHeader", "function", "." ]
def WriteCmdSetHeader(self, f): f.write(" void SetHeader() {\n") f.write(" header.SetCmd<ValueType>();\n") f.write(" }\n") f.write("\n")
[ "def", "WriteCmdSetHeader", "(", "self", ",", "f", ")", ":", "f", ".", "write", "(", "\" void SetHeader() {\\n\"", ")", "f", ".", "write", "(", "\" header.SetCmd<ValueType>();\\n\"", ")", "f", ".", "write", "(", "\" }\\n\"", ")", "f", ".", "write", "(",...
Writes the cmd's SetHeader function.
[ "Writes", "the", "cmd", "'", "s", "SetHeader", "function", "." ]
[ "\"\"\"Writes the cmd's SetHeader function.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteCmdInit
null
def WriteCmdInit(self, f): """Writes the cmd's Init function.""" f.write(" void Init(%s) {\n" % self.MakeTypedCmdArgString("_")) f.write(" SetHeader();\n") args = self.GetCmdArgs() for arg in args: arg.WriteSetCode(f, 4, '_%s' % arg.name) if self.GetInfo("trace_queueing_flow", False): ...
Writes the cmd's Init function.
Writes the cmd's Init function.
[ "Writes", "the", "cmd", "'", "s", "Init", "function", "." ]
def WriteCmdInit(self, f): f.write(" void Init(%s) {\n" % self.MakeTypedCmdArgString("_")) f.write(" SetHeader();\n") args = self.GetCmdArgs() for arg in args: arg.WriteSetCode(f, 4, '_%s' % arg.name) if self.GetInfo("trace_queueing_flow", False): trace = 'TRACE_DISABLED_BY_DEFAULT("...
[ "def", "WriteCmdInit", "(", "self", ",", "f", ")", ":", "f", ".", "write", "(", "\" void Init(%s) {\\n\"", "%", "self", ".", "MakeTypedCmdArgString", "(", "\"_\"", ")", ")", "f", ".", "write", "(", "\" SetHeader();\\n\"", ")", "args", "=", "self", ".",...
Writes the cmd's Init function.
[ "Writes", "the", "cmd", "'", "s", "Init", "function", "." ]
[ "\"\"\"Writes the cmd's Init function.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteCmdSet
null
def WriteCmdSet(self, f): """Writes the cmd's Set function.""" copy_args = self.MakeCmdArgString("_", False) f.write(" void* Set(void* cmd%s) {\n" % self.MakeTypedCmdArgString("_", True)) f.write(" static_cast<ValueType*>(cmd)->Init(%s);\n" % copy_args) f.write(" return NextCmd...
Writes the cmd's Set function.
Writes the cmd's Set function.
[ "Writes", "the", "cmd", "'", "s", "Set", "function", "." ]
def WriteCmdSet(self, f): copy_args = self.MakeCmdArgString("_", False) f.write(" void* Set(void* cmd%s) {\n" % self.MakeTypedCmdArgString("_", True)) f.write(" static_cast<ValueType*>(cmd)->Init(%s);\n" % copy_args) f.write(" return NextCmdAddress<ValueType>(cmd);\n") f.write(...
[ "def", "WriteCmdSet", "(", "self", ",", "f", ")", ":", "copy_args", "=", "self", ".", "MakeCmdArgString", "(", "\"_\"", ",", "False", ")", "f", ".", "write", "(", "\" void* Set(void* cmd%s) {\\n\"", "%", "self", ".", "MakeTypedCmdArgString", "(", "\"_\"", "...
Writes the cmd's Set function.
[ "Writes", "the", "cmd", "'", "s", "Set", "function", "." ]
[ "\"\"\"Writes the cmd's Set function.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "f", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "f", "type": null, "docstring": null, "docstring_tokens": [], ...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
CreateArg
<not_specific>
def CreateArg(arg_string, named_type_info): """Convert string argument to an Argument class that represents it. The parameter 'arg_string' can be a single argument to a GL function, something like 'GLsizei width' or 'const GLenum* bufs'. Returns an instance of the Argument class, or None if 'arg_string' is 'vo...
Convert string argument to an Argument class that represents it. The parameter 'arg_string' can be a single argument to a GL function, something like 'GLsizei width' or 'const GLenum* bufs'. Returns an instance of the Argument class, or None if 'arg_string' is 'void'.
Convert string argument to an Argument class that represents it.
[ "Convert", "string", "argument", "to", "an", "Argument", "class", "that", "represents", "it", "." ]
def CreateArg(arg_string, named_type_info): if arg_string == 'void': return None arg_string = arg_string.strip() arg_default = None if '=' in arg_string: arg_string, arg_default = arg_string.split('=') arg_default = arg_default.strip() arg_parts = arg_string.split() assert len(arg_parts) > 1 a...
[ "def", "CreateArg", "(", "arg_string", ",", "named_type_info", ")", ":", "if", "arg_string", "==", "'void'", ":", "return", "None", "arg_string", "=", "arg_string", ".", "strip", "(", ")", "arg_default", "=", "None", "if", "'='", "in", "arg_string", ":", "...
Convert string argument to an Argument class that represents it.
[ "Convert", "string", "argument", "to", "an", "Argument", "class", "that", "represents", "it", "." ]
[ "\"\"\"Convert string argument to an Argument class that represents it.\n\n The parameter 'arg_string' can be a single argument to a GL function,\n something like 'GLsizei width' or 'const GLenum* bufs'. Returns an instance of\n the Argument class, or None if 'arg_string' is 'void'.\n \"\"\"", "# only the fir...
[ { "param": "arg_string", "type": null }, { "param": "named_type_info", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "arg_string", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "named_type_info", "type": null, "docstring": null, "doc...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
GetFunctionInfo
<not_specific>
def GetFunctionInfo(self, name): """Gets a type info for the given function name.""" if name in self.function_info: func_info = self.function_info[name].copy() else: func_info = {} if not 'type' in func_info: func_info['type'] = '' return func_info
Gets a type info for the given function name.
Gets a type info for the given function name.
[ "Gets", "a", "type", "info", "for", "the", "given", "function", "name", "." ]
def GetFunctionInfo(self, name): if name in self.function_info: func_info = self.function_info[name].copy() else: func_info = {} if not 'type' in func_info: func_info['type'] = '' return func_info
[ "def", "GetFunctionInfo", "(", "self", ",", "name", ")", ":", "if", "name", "in", "self", ".", "function_info", ":", "func_info", "=", "self", ".", "function_info", "[", "name", "]", ".", "copy", "(", ")", "else", ":", "func_info", "=", "{", "}", "if...
Gets a type info for the given function name.
[ "Gets", "a", "type", "info", "for", "the", "given", "function", "name", "." ]
[ "\"\"\"Gets a type info for the given function name.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "name", "type": null, "docstring": null, "docstring_tokens": [...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
ParseGLH
null
def ParseGLH(self, filename): """Parses the cmd_buffer_functions.txt file and extracts the functions""" filename = os.path.join(self.chromium_root_dir, filename) with open(filename, "r") as f: functions = f.read() for line in functions.splitlines(): if self._whitespace_re.match(line) or self...
Parses the cmd_buffer_functions.txt file and extracts the functions
Parses the cmd_buffer_functions.txt file and extracts the functions
[ "Parses", "the", "cmd_buffer_functions", ".", "txt", "file", "and", "extracts", "the", "functions" ]
def ParseGLH(self, filename): filename = os.path.join(self.chromium_root_dir, filename) with open(filename, "r") as f: functions = f.read() for line in functions.splitlines(): if self._whitespace_re.match(line) or self._comment_re.match(line): continue match = self._function_re.mat...
[ "def", "ParseGLH", "(", "self", ",", "filename", ")", ":", "filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "chromium_root_dir", ",", "filename", ")", "with", "open", "(", "filename", ",", "\"r\"", ")", "as", "f", ":", "functions", ...
Parses the cmd_buffer_functions.txt file and extracts the functions
[ "Parses", "the", "cmd_buffer_functions", ".", "txt", "file", "and", "extracts", "the", "functions" ]
[ "\"\"\"Parses the cmd_buffer_functions.txt file and extracts the functions\"\"\"", "#for arg in f.GetOriginalArgs():", "# if not isinstance(arg, EnumArgument) and arg.type == 'GLenum':", "# self.Log(\"%s uses bare GLenum %s.\" % (func_name, arg.name))" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteDocs
null
def WriteDocs(self, filename): """Writes the command buffer doc version of the commands""" with CHeaderWriter(filename, self.year) as f: for func in self.functions: func.WriteDocs(f) f.write("\n") self.generated_cpp_filenames.append(filename)
Writes the command buffer doc version of the commands
Writes the command buffer doc version of the commands
[ "Writes", "the", "command", "buffer", "doc", "version", "of", "the", "commands" ]
def WriteDocs(self, filename): with CHeaderWriter(filename, self.year) as f: for func in self.functions: func.WriteDocs(f) f.write("\n") self.generated_cpp_filenames.append(filename)
[ "def", "WriteDocs", "(", "self", ",", "filename", ")", ":", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ")", "as", "f", ":", "for", "func", "in", "self", ".", "functions", ":", "func", ".", "WriteDocs", "(", "f", ")", "f", "...
Writes the command buffer doc version of the commands
[ "Writes", "the", "command", "buffer", "doc", "version", "of", "the", "commands" ]
[ "\"\"\"Writes the command buffer doc version of the commands\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteFormatTest
null
def WriteFormatTest(self, filename): """Writes the command buffer format test.""" comment = ("// This file contains unit tests for %s commands\n" "// It is included by %s_cmd_format_test.cc\n\n" % (_lower_prefix, _lower_prefix)) with CHeaderWriter(filename, self.year, comment) ...
Writes the command buffer format test.
Writes the command buffer format test.
[ "Writes", "the", "command", "buffer", "format", "test", "." ]
def WriteFormatTest(self, filename): comment = ("// This file contains unit tests for %s commands\n" "// It is included by %s_cmd_format_test.cc\n\n" % (_lower_prefix, _lower_prefix)) with CHeaderWriter(filename, self.year, comment) as f: for func in self.functions: f...
[ "def", "WriteFormatTest", "(", "self", ",", "filename", ")", ":", "comment", "=", "(", "\"// This file contains unit tests for %s commands\\n\"", "\"// It is included by %s_cmd_format_test.cc\\n\\n\"", "%", "(", "_lower_prefix", ",", "_lower_prefix", ")", ")", "with", "CHea...
Writes the command buffer format test.
[ "Writes", "the", "command", "buffer", "format", "test", "." ]
[ "\"\"\"Writes the command buffer format test.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteCmdHelperHeader
null
def WriteCmdHelperHeader(self, filename): """Writes the gles2 command helper.""" with CHeaderWriter(filename, self.year) as f: for func in self.functions: func.WriteCmdHelper(f) self.generated_cpp_filenames.append(filename)
Writes the gles2 command helper.
Writes the gles2 command helper.
[ "Writes", "the", "gles2", "command", "helper", "." ]
def WriteCmdHelperHeader(self, filename): with CHeaderWriter(filename, self.year) as f: for func in self.functions: func.WriteCmdHelper(f) self.generated_cpp_filenames.append(filename)
[ "def", "WriteCmdHelperHeader", "(", "self", ",", "filename", ")", ":", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ")", "as", "f", ":", "for", "func", "in", "self", ".", "functions", ":", "func", ".", "WriteCmdHelper", "(", "f", ...
Writes the gles2 command helper.
[ "Writes", "the", "gles2", "command", "helper", "." ]
[ "\"\"\"Writes the gles2 command helper.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceContextStateHeader
null
def WriteServiceContextStateHeader(self, filename): """Writes the service context state header.""" comment = "// It is included by context_state.h\n" with CHeaderWriter(filename, self.year, comment) as f: f.write("struct EnableFlags {\n") f.write(" EnableFlags();\n") for capability in sel...
Writes the service context state header.
Writes the service context state header.
[ "Writes", "the", "service", "context", "state", "header", "." ]
def WriteServiceContextStateHeader(self, filename): comment = "// It is included by context_state.h\n" with CHeaderWriter(filename, self.year, comment) as f: f.write("struct EnableFlags {\n") f.write(" EnableFlags();\n") for capability in self.capability_flags: f.write(" bool %s;\n" ...
[ "def", "WriteServiceContextStateHeader", "(", "self", ",", "filename", ")", ":", "comment", "=", "\"// It is included by context_state.h\\n\"", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ",", "comment", ")", "as", "f", ":", "f", ".", "wr...
Writes the service context state header.
[ "Writes", "the", "service", "context", "state", "header", "." ]
[ "\"\"\"Writes the service context state header.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteClientContextStateHeader
null
def WriteClientContextStateHeader(self, filename): """Writes the client context state header.""" comment = "// It is included by client_context_state.h\n" with CHeaderWriter(filename, self.year, comment) as f: f.write("struct EnableFlags {\n") f.write(" EnableFlags();\n") for capability i...
Writes the client context state header.
Writes the client context state header.
[ "Writes", "the", "client", "context", "state", "header", "." ]
def WriteClientContextStateHeader(self, filename): comment = "// It is included by client_context_state.h\n" with CHeaderWriter(filename, self.year, comment) as f: f.write("struct EnableFlags {\n") f.write(" EnableFlags();\n") for capability in self.capability_flags: if 'extension_fla...
[ "def", "WriteClientContextStateHeader", "(", "self", ",", "filename", ")", ":", "comment", "=", "\"// It is included by client_context_state.h\\n\"", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ",", "comment", ")", "as", "f", ":", "f", ".",...
Writes the client context state header.
[ "Writes", "the", "client", "context", "state", "header", "." ]
[ "\"\"\"Writes the client context state header.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteClientContextStateImpl
null
def WriteClientContextStateImpl(self, filename): """Writes the context state client side implementation.""" comment = "// It is included by client_context_state.cc\n" with CHeaderWriter(filename, self.year, comment) as f: code = [] for capability in self.capability_flags: if 'extension_f...
Writes the context state client side implementation.
Writes the context state client side implementation.
[ "Writes", "the", "context", "state", "client", "side", "implementation", "." ]
def WriteClientContextStateImpl(self, filename): comment = "// It is included by client_context_state.cc\n" with CHeaderWriter(filename, self.year, comment) as f: code = [] for capability in self.capability_flags: if 'extension_flag' in capability: continue code.append("%s(...
[ "def", "WriteClientContextStateImpl", "(", "self", ",", "filename", ")", ":", "comment", "=", "\"// It is included by client_context_state.cc\\n\"", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ",", "comment", ")", "as", "f", ":", "code", "=...
Writes the context state client side implementation.
[ "Writes", "the", "context", "state", "client", "side", "implementation", "." ]
[ "\"\"\"Writes the context state client side implementation.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceImplementation
null
def WriteServiceImplementation(self, filename): """Writes the service decoder implementation.""" comment = "// It is included by %s_cmd_decoder.cc\n" % _lower_prefix with CHeaderWriter(filename, self.year, comment) as f: for func in self.functions: func.WriteServiceImplementation(f) if s...
Writes the service decoder implementation.
Writes the service decoder implementation.
[ "Writes", "the", "service", "decoder", "implementation", "." ]
def WriteServiceImplementation(self, filename): comment = "// It is included by %s_cmd_decoder.cc\n" % _lower_prefix with CHeaderWriter(filename, self.year, comment) as f: for func in self.functions: func.WriteServiceImplementation(f) if self.capability_flags and _prefix == 'GLES2': ...
[ "def", "WriteServiceImplementation", "(", "self", ",", "filename", ")", ":", "comment", "=", "\"// It is included by %s_cmd_decoder.cc\\n\"", "%", "_lower_prefix", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ",", "comment", ")", "as", "f", ...
Writes the service decoder implementation.
[ "Writes", "the", "service", "decoder", "implementation", "." ]
[ "\"\"\"Writes the service decoder implementation.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WritePassthroughServiceImplementation
null
def WritePassthroughServiceImplementation(self, filename): """Writes the passthrough service decoder implementation.""" with CWriter(filename, self.year) as f: header = """ #include \"gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h\" namespace gpu { namespace gles2 { """; f.write(header...
Writes the passthrough service decoder implementation.
Writes the passthrough service decoder implementation.
[ "Writes", "the", "passthrough", "service", "decoder", "implementation", "." ]
def WritePassthroughServiceImplementation(self, filename): with CWriter(filename, self.year) as f: header = """ #include \"gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h\" namespace gpu { namespace gles2 { """; f.write(header); for func in self.functions: func.WritePassthroughS...
[ "def", "WritePassthroughServiceImplementation", "(", "self", ",", "filename", ")", ":", "with", "CWriter", "(", "filename", ",", "self", ".", "year", ")", "as", "f", ":", "header", "=", "\"\"\"\n#include \\\"gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h\\\"\n...
Writes the passthrough service decoder implementation.
[ "Writes", "the", "passthrough", "service", "decoder", "implementation", "." ]
[ "\"\"\"Writes the passthrough service decoder implementation.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceUnitTests
null
def WriteServiceUnitTests(self, filename_pattern): """Writes the service decoder unit tests.""" num_tests = len(self.functions) FUNCTIONS_PER_FILE = 98 # hard code this so it doesn't change. count = 0 for test_num in range(0, num_tests, FUNCTIONS_PER_FILE): count += 1 filename = filenam...
Writes the service decoder unit tests.
Writes the service decoder unit tests.
[ "Writes", "the", "service", "decoder", "unit", "tests", "." ]
def WriteServiceUnitTests(self, filename_pattern): num_tests = len(self.functions) FUNCTIONS_PER_FILE = 98 count = 0 for test_num in range(0, num_tests, FUNCTIONS_PER_FILE): count += 1 filename = filename_pattern % count comment = "// It is included by %s_cmd_decoder_unittest_%d.cc\n...
[ "def", "WriteServiceUnitTests", "(", "self", ",", "filename_pattern", ")", ":", "num_tests", "=", "len", "(", "self", ".", "functions", ")", "FUNCTIONS_PER_FILE", "=", "98", "count", "=", "0", "for", "test_num", "in", "range", "(", "0", ",", "num_tests", "...
Writes the service decoder unit tests.
[ "Writes", "the", "service", "decoder", "unit", "tests", "." ]
[ "\"\"\"Writes the service decoder unit tests.\"\"\"", "# hard code this so it doesn't change.", "# Do any filtering of the functions here, so that the functions", "# will not move between the numbered files if filtering properties", "# are changed." ]
[ { "param": "self", "type": null }, { "param": "filename_pattern", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename_pattern", "type": null, "docstring": null, "docstrin...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteServiceUnitTestsForExtensions
null
def WriteServiceUnitTestsForExtensions(self, filename): """Writes the service decoder unit tests for functions with extension_flag. The functions are special in that they need a specific unit test baseclass to turn on the extension. """ functions = [f for f in self.functions if f.GetInfo('ext...
Writes the service decoder unit tests for functions with extension_flag. The functions are special in that they need a specific unit test baseclass to turn on the extension.
Writes the service decoder unit tests for functions with extension_flag. The functions are special in that they need a specific unit test baseclass to turn on the extension.
[ "Writes", "the", "service", "decoder", "unit", "tests", "for", "functions", "with", "extension_flag", ".", "The", "functions", "are", "special", "in", "that", "they", "need", "a", "specific", "unit", "test", "baseclass", "to", "turn", "on", "the", "extension",...
def WriteServiceUnitTestsForExtensions(self, filename): functions = [f for f in self.functions if f.GetInfo('extension_flag')] comment = "// It is included by gles2_cmd_decoder_unittest_extensions.cc\n" with CHeaderWriter(filename, self.year, comment) as f: for func in functions: if True: ...
[ "def", "WriteServiceUnitTestsForExtensions", "(", "self", ",", "filename", ")", ":", "functions", "=", "[", "f", "for", "f", "in", "self", ".", "functions", "if", "f", ".", "GetInfo", "(", "'extension_flag'", ")", "]", "comment", "=", "\"// It is included by g...
Writes the service decoder unit tests for functions with extension_flag.
[ "Writes", "the", "service", "decoder", "unit", "tests", "for", "functions", "with", "extension_flag", "." ]
[ "\"\"\"Writes the service decoder unit tests for functions with extension_flag.\n\n The functions are special in that they need a specific unit test\n baseclass to turn on the extension.\n \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2CLibImplementation
null
def WriteGLES2CLibImplementation(self, filename): """Writes the GLES2 c lib implementation.""" comment = "// These functions emulate GLES2 over command buffers.\n" with CHeaderWriter(filename, self.year, comment) as f: for func in self.original_functions: func.WriteGLES2CLibImplementation(f) ...
Writes the GLES2 c lib implementation.
Writes the GLES2 c lib implementation.
[ "Writes", "the", "GLES2", "c", "lib", "implementation", "." ]
def WriteGLES2CLibImplementation(self, filename): comment = "// These functions emulate GLES2 over command buffers.\n" with CHeaderWriter(filename, self.year, comment) as f: for func in self.original_functions: func.WriteGLES2CLibImplementation(f) f.write(""" namespace gles2 { extern const N...
[ "def", "WriteGLES2CLibImplementation", "(", "self", ",", "filename", ")", ":", "comment", "=", "\"// These functions emulate GLES2 over command buffers.\\n\"", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ",", "comment", ")", "as", "f", ":", "...
Writes the GLES2 c lib implementation.
[ "Writes", "the", "GLES2", "c", "lib", "implementation", "." ]
[ "\"\"\"Writes the GLES2 c lib implementation.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2InterfaceHeader
null
def WriteGLES2InterfaceHeader(self, filename): """Writes the GLES2 interface header.""" comment = ("// This file is included by %s_interface.h to declare the\n" "// GL api functions.\n" % _lower_prefix) with CHeaderWriter(filename, self.year, comment) as f: for func in self.original_fun...
Writes the GLES2 interface header.
Writes the GLES2 interface header.
[ "Writes", "the", "GLES2", "interface", "header", "." ]
def WriteGLES2InterfaceHeader(self, filename): comment = ("// This file is included by %s_interface.h to declare the\n" "// GL api functions.\n" % _lower_prefix) with CHeaderWriter(filename, self.year, comment) as f: for func in self.original_functions: func.WriteGLES2InterfaceHeade...
[ "def", "WriteGLES2InterfaceHeader", "(", "self", ",", "filename", ")", ":", "comment", "=", "(", "\"// This file is included by %s_interface.h to declare the\\n\"", "\"// GL api functions.\\n\"", "%", "_lower_prefix", ")", "with", "CHeaderWriter", "(", "filename", ",", "sel...
Writes the GLES2 interface header.
[ "Writes", "the", "GLES2", "interface", "header", "." ]
[ "\"\"\"Writes the GLES2 interface header.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
b3f285f7b84beac3c459bce9f2d58f2ff26b251e
sunlongbo/chromium
gpu/command_buffer/build_cmd_buffer_lib.py
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
Python
WriteGLES2InterfaceStub
null
def WriteGLES2InterfaceStub(self, filename): """Writes the GLES2 interface stub header.""" comment = "// This file is included by gles2_interface_stub.h.\n" with CHeaderWriter(filename, self.year, comment) as f: for func in self.original_functions: func.WriteGLES2InterfaceStub(f) self.gene...
Writes the GLES2 interface stub header.
Writes the GLES2 interface stub header.
[ "Writes", "the", "GLES2", "interface", "stub", "header", "." ]
def WriteGLES2InterfaceStub(self, filename): comment = "// This file is included by gles2_interface_stub.h.\n" with CHeaderWriter(filename, self.year, comment) as f: for func in self.original_functions: func.WriteGLES2InterfaceStub(f) self.generated_cpp_filenames.append(filename)
[ "def", "WriteGLES2InterfaceStub", "(", "self", ",", "filename", ")", ":", "comment", "=", "\"// This file is included by gles2_interface_stub.h.\\n\"", "with", "CHeaderWriter", "(", "filename", ",", "self", ".", "year", ",", "comment", ")", "as", "f", ":", "for", ...
Writes the GLES2 interface stub header.
[ "Writes", "the", "GLES2", "interface", "stub", "header", "." ]
[ "\"\"\"Writes the GLES2 interface stub header.\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...