Lines Matching refs:Shader
15 Shader::Shader(GLuint service_id, GLenum shader_type)
22 Shader::~Shader() {
25 void Shader::IncUseCount() {
29 void Shader::DecUseCount() {
34 void Shader::MarkAsDeleted() {
39 void Shader::SetStatus(
61 const Shader::VariableInfo*
62 Shader::GetAttribInfo(
68 const std::string* Shader::GetAttribMappedName(
78 const std::string* Shader::GetOriginalNameFromHashedName(
86 const Shader::VariableInfo*
87 Shader::GetUniformInfo(
102 Shader* shader = shaders_.begin()->second.get();
103 if (!shader->IsDeleted()) {
104 glDeleteShader(shader->service_id());
105 shader->MarkAsDeleted();
112 Shader* ShaderManager::CreateShader(
118 client_id, scoped_refptr<Shader>(
119 new Shader(service_id, shader_type))));
124 Shader* ShaderManager::GetShader(GLuint client_id) {
141 bool ShaderManager::IsOwned(Shader* shader) {
144 if (it->second.get() == shader) {
151 void ShaderManager::RemoveShader(Shader* shader) {
152 DCHECK(shader);
153 DCHECK(IsOwned(shader));
154 if (shader->IsDeleted() && !shader->InUse()) {
157 if (it->second.get() == shader) {
166 void ShaderManager::MarkAsDeleted(Shader* shader) {
167 DCHECK(shader);
168 DCHECK(IsOwned(shader));
169 shader->MarkAsDeleted();
170 RemoveShader(shader);
173 void ShaderManager::UseShader(Shader* shader) {
174 DCHECK(shader);
175 DCHECK(IsOwned(shader));
176 shader->IncUseCount();
179 void ShaderManager::UnuseShader(Shader* shader) {
180 DCHECK(shader);
181 DCHECK(IsOwned(shader));
182 shader->DecUseCount();
183 RemoveShader(shader);