summaryrefslogtreecommitdiffstats
path: root/ppapi/generators
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 04:34:37 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 04:34:37 +0000
commitb3fcc410c3a28e2766a3ebb7d2e8ffa60a7883fc (patch)
tree596879beb14fa2054968e5bf08259413d90a1665 /ppapi/generators
parent89df1e0500b42e6dd707e4178f8e59cfc8353183 (diff)
downloadchromium_src-b3fcc410c3a28e2766a3ebb7d2e8ffa60a7883fc.zip
chromium_src-b3fcc410c3a28e2766a3ebb7d2e8ffa60a7883fc.tar.gz
chromium_src-b3fcc410c3a28e2766a3ebb7d2e8ffa60a7883fc.tar.bz2
Pepper: Reduce includes in generated thunks.
There are some unnecessary includes in generated thunks. We should remove these for clarity, and (hopefully) to reduce build time. A small test showed that ppb_view_thunk.cc built 18% faster after the change, but that's well within the noise on my local system. BUG=334727 Review URL: https://codereview.chromium.org/137353003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245111 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators')
-rwxr-xr-xppapi/generators/idl_thunk.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/ppapi/generators/idl_thunk.py b/ppapi/generators/idl_thunk.py
index 023335c..d06defb 100755
--- a/ppapi/generators/idl_thunk.py
+++ b/ppapi/generators/idl_thunk.py
@@ -460,9 +460,7 @@ class TGen(GeneratorByFile):
includes = ['ppapi/c/pp_errors.h',
'ppapi/shared_impl/tracked_callback.h',
'ppapi/thunk/enter.h',
- 'ppapi/thunk/ppb_instance_api.h',
- 'ppapi/thunk/resource_creation_api.h',
- 'ppapi/thunk/thunk.h']
+ 'ppapi/thunk/ppapi_thunk_export.h']
includes.append(_GetHeaderFileName(filenode))
for api in meta.Apis():
includes.append('%s' % api.lower())
@@ -547,10 +545,11 @@ class TGen(GeneratorByFile):
out.Write('} // namespace\n')
out.Write('\n')
for thunk_type, thunk_name in version_list:
- thunk_decl = 'const %s* Get%s_Thunk() {\n' % (thunk_type, thunk_type)
+ thunk_decl = ('PPAPI_THUNK_EXPORT const %s* Get%s_Thunk() {\n' %
+ (thunk_type, thunk_type))
if len(thunk_decl) > 80:
- thunk_decl = 'const %s*\n Get%s_Thunk() {\n' % (thunk_type,
- thunk_type)
+ thunk_decl = ('PPAPI_THUNK_EXPORT const %s*\n Get%s_Thunk() {\n' %
+ (thunk_type, thunk_type))
out.Write(thunk_decl)
out.Write(' return &%s;\n' % thunk_name)
out.Write('}\n')