| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/shader_translator.h" | 5 #include "gpu/command_buffer/service/shader_translator.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 DestructionObserver* observer) { | 269 DestructionObserver* observer) { |
| 270 destruction_observers_.AddObserver(observer); | 270 destruction_observers_.AddObserver(observer); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void ShaderTranslator::RemoveDestructionObserver( | 273 void ShaderTranslator::RemoveDestructionObserver( |
| 274 DestructionObserver* observer) { | 274 DestructionObserver* observer) { |
| 275 destruction_observers_.RemoveObserver(observer); | 275 destruction_observers_.RemoveObserver(observer); |
| 276 } | 276 } |
| 277 | 277 |
| 278 ShaderTranslator::~ShaderTranslator() { | 278 ShaderTranslator::~ShaderTranslator() { |
| 279 FOR_EACH_OBSERVER(DestructionObserver, | 279 for (auto& observer : destruction_observers_) |
| 280 destruction_observers_, | 280 observer.OnDestruct(this); |
| 281 OnDestruct(this)); | |
| 282 | 281 |
| 283 if (compiler_ != NULL) | 282 if (compiler_ != NULL) |
| 284 ShDestruct(compiler_); | 283 ShDestruct(compiler_); |
| 285 } | 284 } |
| 286 | 285 |
| 287 } // namespace gles2 | 286 } // namespace gles2 |
| 288 } // namespace gpu | 287 } // namespace gpu |
| 289 | 288 |
| OLD | NEW |