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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.h

Issue 217813004: Make ShaderTranslatorCache thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: protect ShFinalize Created 6 years, 9 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index 03a4b546f09cf853170588777681b4f74dc7a884..7d021008f3f9cc016fe48503d2703c066181ffc9 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -16,6 +16,7 @@
#include "gpu/command_buffer/common/capabilities.h"
#include "gpu/command_buffer/service/common_decoder.h"
#include "gpu/command_buffer/service/logger.h"
+#include "gpu/command_buffer/service/shader_translator_cache.h"
#include "ui/gfx/size.h"
#include "ui/gl/gl_context.h"
@@ -96,18 +97,22 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>,
// Parameters:
// surface: the GL surface to render to.
// context: the GL context to render to.
+ // shader_translator_cache: the translator cache to get retrieve shader
+ // translators.
// offscreen: whether to make the context offscreen or not. When FBO 0 is
// bound, offscreen contexts render to an internal buffer, onscreen ones
// to the surface.
// size: the size if the GL context is offscreen.
// Returns:
// true if successful.
- virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface,
- const scoped_refptr<gfx::GLContext>& context,
- bool offscreen,
- const gfx::Size& size,
- const DisallowedFeatures& disallowed_features,
- const std::vector<int32>& attribs) = 0;
+ virtual bool Initialize(
+ const scoped_refptr<gfx::GLSurface>& surface,
+ const scoped_refptr<gfx::GLContext>& context,
+ const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
+ bool offscreen,
+ const gfx::Size& size,
+ const DisallowedFeatures& disallowed_features,
+ const std::vector<int32>& attribs) = 0;
// Destroys the graphics context.
virtual void Destroy(bool have_context) = 0;

Powered by Google App Engine
This is Rietveld 408576698