OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/mailbox_synchronizer.h" | 5 #include "gpu/command_buffer/service/mailbox_synchronizer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "gpu/command_buffer/service/mailbox_manager.h" | 8 #include "gpu/command_buffer/service/mailbox_manager.h" |
9 #include "gpu/command_buffer/service/texture_manager.h" | 9 #include "gpu/command_buffer/service/texture_manager.h" |
10 #include "ui/gl/gl_implementation.h" | 10 #include "ui/gl/gl_implementation.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 std::set<TargetName>::const_iterator mb_it = | 159 std::set<TargetName>::const_iterator mb_it = |
160 group->mailboxes.find(target_name); | 160 group->mailboxes.find(target_name); |
161 if (mb_it == group->mailboxes.end()) { | 161 if (mb_it == group->mailboxes.end()) { |
162 // We previously did not associate this texture with the given mailbox. | 162 // We previously did not associate this texture with the given mailbox. |
163 // Unlink other texture groups from the mailbox. | 163 // Unlink other texture groups from the mailbox. |
164 ReassociateMailboxLocked(target_name, group); | 164 ReassociateMailboxLocked(target_name, group); |
165 } | 165 } |
166 UpdateTextureLocked(texture, texture_version); | 166 UpdateTextureLocked(texture, texture_version); |
167 | 167 |
168 } else { | 168 } else { |
| 169 // Skip compositor resources/tile textures. |
| 170 // TODO: Remove this, see crbug.com/399226. |
| 171 if (texture->pool() == GL_TEXTURE_POOL_MANAGED_CHROMIUM) |
| 172 continue; |
| 173 |
169 linked_ptr<TextureGroup> group = make_linked_ptr(new TextureGroup( | 174 linked_ptr<TextureGroup> group = make_linked_ptr(new TextureGroup( |
170 TextureDefinition(target_name.target, texture, 1, NULL))); | 175 TextureDefinition(target_name.target, texture, 1, NULL))); |
171 | 176 |
172 // Unlink other textures from this mailbox in case the name is not new. | 177 // Unlink other textures from this mailbox in case the name is not new. |
173 ReassociateMailboxLocked(target_name, group.get()); | 178 ReassociateMailboxLocked(target_name, group.get()); |
174 textures_.insert(std::make_pair(texture, TextureVersion(group))); | 179 textures_.insert(std::make_pair(texture, TextureVersion(group))); |
175 } | 180 } |
176 } | 181 } |
177 } | 182 } |
178 | 183 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 definition.IsOlderThan(it->second.version)) | 222 definition.IsOlderThan(it->second.version)) |
218 continue; | 223 continue; |
219 it->second.version = definition.version(); | 224 it->second.version = definition.version(); |
220 definition.UpdateTexture(texture); | 225 definition.UpdateTexture(texture); |
221 } | 226 } |
222 } | 227 } |
223 } | 228 } |
224 | 229 |
225 } // namespace gles2 | 230 } // namespace gles2 |
226 } // namespace gpu | 231 } // namespace gpu |
OLD | NEW |