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

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

Issue 429983002: Android Webview: Skip managed resources in mailbox sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment, todo, bug Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698