Chromium Code Reviews| 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_manager_sync.h" | 5 #include "gpu/command_buffer/service/mailbox_manager_sync.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 if (!definition.IsOlderThan(group_ref->version)) | 287 if (!definition.IsOlderThan(group_ref->version)) |
| 288 return; | 288 return; |
| 289 | 289 |
| 290 // Also don't push redundant updates. Note that it would break the | 290 // Also don't push redundant updates. Note that it would break the |
| 291 // versioning. | 291 // versioning. |
| 292 if (definition.Matches(texture)) | 292 if (definition.Matches(texture)) |
| 293 return; | 293 return; |
| 294 | 294 |
| 295 DCHECK(!image || image_buffer.get()); | 295 DCHECK(!image || image_buffer.get()); |
| 296 if (image && !image_buffer->IsClient(image)) { | 296 if (image && !image_buffer->IsClient(image)) { |
| 297 LOG(ERROR) << "MailboxSync: Incompatible attachment"; | 297 // LOG(ERROR) << "MailboxSync: Incompatible attachment"; |
|
boliu
2016/06/09 15:37:15
not ok
| |
| 298 return; | 298 return; |
| 299 } | 299 } |
| 300 | 300 |
| 301 group->SetDefinition(TextureDefinition(texture, ++group_ref->version, | 301 group->SetDefinition(TextureDefinition(texture, ++group_ref->version, |
| 302 image ? image_buffer : NULL)); | 302 image ? image_buffer : NULL)); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void MailboxManagerSync::PushTextureUpdates(const SyncToken& token) { | 305 void MailboxManagerSync::PushTextureUpdates(const SyncToken& token) { |
| 306 base::AutoLock lock(g_lock.Get()); | 306 base::AutoLock lock(g_lock.Get()); |
| 307 | 307 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 334 | 334 |
| 335 if (!needs_update.empty()) { | 335 if (!needs_update.empty()) { |
| 336 for (const TextureUpdatePair& pair : needs_update) { | 336 for (const TextureUpdatePair& pair : needs_update) { |
| 337 pair.second.UpdateTexture(pair.first); | 337 pair.second.UpdateTexture(pair.first); |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace gles2 | 342 } // namespace gles2 |
| 343 } // namespace gpu | 343 } // namespace gpu |
| OLD | NEW |