OLD | NEW |
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/renderbuffer_manager.h" | 5 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 7 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
9 | 9 |
10 namespace gpu { | 10 namespace gpu { |
11 namespace gles2 { | 11 namespace gles2 { |
12 | 12 |
| 13 RenderbufferManager::RenderbufferManager() {} |
| 14 |
13 RenderbufferManager::~RenderbufferManager() { | 15 RenderbufferManager::~RenderbufferManager() { |
14 DCHECK(renderbuffer_infos_.empty()); | 16 DCHECK(renderbuffer_infos_.empty()); |
15 } | 17 } |
16 | 18 |
17 void RenderbufferManager::Destroy(bool have_context) { | 19 void RenderbufferManager::Destroy(bool have_context) { |
18 while (!renderbuffer_infos_.empty()) { | 20 while (!renderbuffer_infos_.empty()) { |
19 if (have_context) { | 21 if (have_context) { |
20 RenderbufferInfo* info = renderbuffer_infos_.begin()->second; | 22 RenderbufferInfo* info = renderbuffer_infos_.begin()->second; |
21 if (!info->IsDeleted()) { | 23 if (!info->IsDeleted()) { |
22 GLuint service_id = info->service_id(); | 24 GLuint service_id = info->service_id(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return true; | 64 return true; |
63 } | 65 } |
64 } | 66 } |
65 return false; | 67 return false; |
66 } | 68 } |
67 | 69 |
68 } // namespace gles2 | 70 } // namespace gles2 |
69 } // namespace gpu | 71 } // namespace gpu |
70 | 72 |
71 | 73 |
OLD | NEW |