diff options
author | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 22:45:33 +0000 |
---|---|---|
committer | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 22:45:33 +0000 |
commit | 4a04bced46a3ccb9911f8976d78545b2b58a50bc (patch) | |
tree | d0b733c535d9d4a0813fd084a3cf6baead1a06b6 /ppapi/native_client | |
parent | 17b514b537e9a2ac9ec04b9c0142aa59e4855982 (diff) | |
download | chromium_src-4a04bced46a3ccb9911f8976d78545b2b58a50bc.zip chromium_src-4a04bced46a3ccb9911f8976d78545b2b58a50bc.tar.gz chromium_src-4a04bced46a3ccb9911f8976d78545b2b58a50bc.tar.bz2 |
Remove TLS from cached variables in 3d proxy. We'll make them
TLS again when PPAPI off the main thread is implemented, and TLS
performance in NaCl improves.
BUG= http://code.google.com/p/chromium/issues/detail?id=99217
TEST= NaCl's graphics3d tests
Review URL: http://codereview.chromium.org/8148003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r-- | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc | 7 | ||||
-rw-r--r-- | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc index 736eee2..8b71506 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc @@ -170,8 +170,11 @@ int32_t SwapBuffs(PP_Resource graphics3d_id, } // namespace -__thread PP_Resource PluginGraphics3D::cached_graphics3d_id = 0; -__thread gpu::gles2::GLES2Implementation* + // TODO(nfullagar): make cached_* variables TLS once 64bit NaCl TLS is faster, + // and the proxy has support for being called off the main thread. + // see: http://code.google.com/p/chromium/issues/detail?id=99217 + PP_Resource PluginGraphics3D::cached_graphics3d_id = 0; + gpu::gles2::GLES2Implementation* PluginGraphics3D::cached_implementation = NULL; PluginGraphics3D::PluginGraphics3D() : instance_id_(0) { } diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h index ce9089b..115cc25 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h @@ -54,8 +54,11 @@ class PluginGraphics3D : public PluginResource { private: - static __thread PP_Resource cached_graphics3d_id; - static __thread gpu::gles2::GLES2Implementation* cached_implementation; + // TODO(nfullagar): make cached_* variables TLS once 64bit NaCl is faster, + // and the proxy has support for being called off the main thread. + // see: http://code.google.com/p/chromium/issues/detail?id=99217 + static PP_Resource cached_graphics3d_id; + static gpu::gles2::GLES2Implementation* cached_implementation; // GLES2 Implementation objects. scoped_ptr<gpu::CommandBuffer> command_buffer_; |