Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 2453823003: Clean up dead code in build_gles2_cmd_buffer.py (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/build_gles2_cmd_buffer.py
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 2944605850a137bbfd4d9c5fd53b6bd20eb87184..9b399703440e7aa5c248dd7010c5329a583bbbbc 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -5700,17 +5700,7 @@ class NoCommandHandler(CustomHandler):
class DataHandler(TypeHandler):
- """Handler for glBufferData, glBufferSubData, glTexImage*D, glTexSubImage*D,
- glCompressedTexImage*D, glCompressedTexImageSub*D."""
-
- def InitFunction(self, func):
- """Overrriden from TypeHandler."""
- if (func.name.startswith('CompressedTex') and func.name.endswith('Bucket')):
- # Remove imageSize argument, take the size from the bucket instead.
- func.cmd_args = [arg for arg in func.cmd_args if arg.name != 'imageSize']
- func.AddCmdArg(Argument('bucket_id', 'GLuint'))
- else:
- TypeHandler.InitFunction(self, func)
+ """Handler for glBufferData, glBufferSubData, glTex{Sub}Image*D."""
def WriteGetDataSizeCode(self, func, f):
"""Overrriden from TypeHandler."""
@@ -5720,18 +5710,6 @@ class DataHandler(TypeHandler):
name = name[0:-9]
if name == 'BufferData' or name == 'BufferSubData':
f.write(" uint32_t data_size = size;\n")
- elif (name.startswith('CompressedTex')):
- if name.endswith('Bucket'):
- f.write(""" Bucket* bucket = GetBucket(bucket_id);
- if (!bucket)
- return error::kInvalidArguments;
- uint32_t data_size = bucket->size();
- GLsizei imageSize = data_size;
- const void* data = bucket->GetData(0, data_size);
- DCHECK(data || !imageSize);
-""")
- else:
- f.write(" uint32_t data_size = imageSize;\n")
elif name == 'TexImage2D' or name == 'TexSubImage2D':
code = """ uint32_t data_size;
if (!GLES2Util::ComputeImageDataSize(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698