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

Side by Side Diff: gpu/command_buffer/service/shader_manager.cc

Issue 3743001: FBTF: Fix more ctor/dtors found by clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Rebase to pick up mac fix on ToT Created 10 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/shader_manager.h ('k') | media/base/filters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_manager.h" 5 #include "gpu/command_buffer/service/shader_manager.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 7
8 namespace gpu { 8 namespace gpu {
9 namespace gles2 { 9 namespace gles2 {
10 10
11 ShaderManager::ShaderManager() {}
12
11 ShaderManager::~ShaderManager() { 13 ShaderManager::~ShaderManager() {
12 DCHECK(shader_infos_.empty()); 14 DCHECK(shader_infos_.empty());
13 } 15 }
14 16
15 void ShaderManager::Destroy(bool have_context) { 17 void ShaderManager::Destroy(bool have_context) {
16 while (!shader_infos_.empty()) { 18 while (!shader_infos_.empty()) {
17 if (have_context) { 19 if (have_context) {
18 ShaderInfo* info = shader_infos_.begin()->second; 20 ShaderInfo* info = shader_infos_.begin()->second;
19 if (!info->IsDeleted()) { 21 if (!info->IsDeleted()) {
20 glDeleteShader(info->service_id()); 22 glDeleteShader(info->service_id());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return true; 58 return true;
57 } 59 }
58 } 60 }
59 return false; 61 return false;
60 } 62 }
61 63
62 } // namespace gles2 64 } // namespace gles2
63 } // namespace gpu 65 } // namespace gpu
64 66
65 67
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_manager.h ('k') | media/base/filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698