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

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

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | gpu/command_buffer/service/texture_definition.cc » ('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 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 <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 // Make sure we don't clobber with an older version 278 // Make sure we don't clobber with an older version
279 if (!definition.IsOlderThan(group_ref->version)) 279 if (!definition.IsOlderThan(group_ref->version))
280 return; 280 return;
281 281
282 // Also don't push redundant updates. Note that it would break the 282 // Also don't push redundant updates. Note that it would break the
283 // versioning. 283 // versioning.
284 if (definition.Matches(texture)) 284 if (definition.Matches(texture))
285 return; 285 return;
286 286
287 DCHECK_IMPLIES(gl_image, image_buffer.get()); 287 DCHECK(!gl_image || image_buffer.get());
288 if (gl_image && !image_buffer->IsClient(gl_image)) { 288 if (gl_image && !image_buffer->IsClient(gl_image)) {
289 LOG(ERROR) << "MailboxSync: Incompatible attachment"; 289 LOG(ERROR) << "MailboxSync: Incompatible attachment";
290 return; 290 return;
291 } 291 }
292 292
293 group->SetDefinition(TextureDefinition(texture, ++group_ref->version, 293 group->SetDefinition(TextureDefinition(texture, ++group_ref->version,
294 gl_image ? image_buffer : NULL)); 294 gl_image ? image_buffer : NULL));
295 } 295 }
296 296
297 void MailboxManagerSync::PushTextureUpdates(uint32 sync_point) { 297 void MailboxManagerSync::PushTextureUpdates(uint32 sync_point) {
(...skipping 29 matching lines...) Expand all
327 if (!needs_update.empty()) { 327 if (!needs_update.empty()) {
328 ScopedUpdateTexture scoped_update_texture; 328 ScopedUpdateTexture scoped_update_texture;
329 for (const TextureUpdatePair& pair : needs_update) { 329 for (const TextureUpdatePair& pair : needs_update) {
330 pair.second.UpdateTexture(pair.first); 330 pair.second.UpdateTexture(pair.first);
331 } 331 }
332 } 332 }
333 } 333 }
334 334
335 } // namespace gles2 335 } // namespace gles2
336 } // namespace gpu 336 } // namespace gpu
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698