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

Unified Diff: gpu/command_buffer/service/shader_translator.cc

Issue 10694111: RefCounted types should not have public destructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android & Win compiles Created 8 years, 5 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 | « gpu/command_buffer/service/shader_translator.h ('k') | ipc/ipc_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/shader_translator.cc
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index 6839736f9c220b075afa504b0d8cb8d0aceb6e0c..c58d19820eba892366cac8b4ca4412988bdea0a9 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -11,6 +11,9 @@
#include "base/logging.h"
namespace {
+
+using gpu::gles2::ShaderTranslator;
+
void FinalizeShaderTranslator(void* /* dummy */) {
ShFinalize();
}
@@ -24,7 +27,6 @@ bool InitializeShaderTranslator() {
return initialized;
}
-using gpu::gles2::ShaderTranslator;
void GetVariableInfo(ShHandle compiler, ShShaderInfo var_type,
ShaderTranslator::VariableMap* var_map) {
int name_len = 0, mapped_name_len = 0;
@@ -72,6 +74,7 @@ void GetVariableInfo(ShHandle compiler, ShShaderInfo var_type,
(*var_map)[mapped_name.get()] = info;
}
}
+
} // namespace
namespace gpu {
@@ -89,15 +92,6 @@ ShaderTranslator::ShaderTranslator()
needs_built_in_function_emulation_(false) {
}
-ShaderTranslator::~ShaderTranslator() {
- FOR_EACH_OBSERVER(DestructionObserver,
- destruction_observers_,
- OnDestruct(this));
-
- if (compiler_ != NULL)
- ShDestruct(compiler_);
-}
-
bool ShaderTranslator::Init(
ShShaderType shader_type,
ShShaderSpec shader_spec,
@@ -191,6 +185,15 @@ void ShaderTranslator::RemoveDestructionObserver(
destruction_observers_.RemoveObserver(observer);
}
+ShaderTranslator::~ShaderTranslator() {
+ FOR_EACH_OBSERVER(DestructionObserver,
+ destruction_observers_,
+ OnDestruct(this));
+
+ if (compiler_ != NULL)
+ ShDestruct(compiler_);
+}
+
void ShaderTranslator::ClearResults() {
translated_shader_.reset();
info_log_.reset();
« no previous file with comments | « gpu/command_buffer/service/shader_translator.h ('k') | ipc/ipc_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698