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

Side by Side Diff: gpu/command_buffer/service/texture_definition.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 | « gpu/command_buffer/service/mailbox_manager_sync.cc ('k') | ui/aura/window.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/texture_definition.h" 5 #include "gpu/command_buffer/service/texture_definition.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 : version_(version), 354 : version_(version),
355 target_(texture->target()), 355 target_(texture->target()),
356 image_buffer_(image_buffer), 356 image_buffer_(image_buffer),
357 min_filter_(texture->min_filter()), 357 min_filter_(texture->min_filter()),
358 mag_filter_(texture->mag_filter()), 358 mag_filter_(texture->mag_filter()),
359 wrap_s_(texture->wrap_s()), 359 wrap_s_(texture->wrap_s()),
360 wrap_t_(texture->wrap_t()), 360 wrap_t_(texture->wrap_t()),
361 usage_(texture->usage()), 361 usage_(texture->usage()),
362 immutable_(texture->IsImmutable()), 362 immutable_(texture->IsImmutable()),
363 defined_(texture->IsDefined()) { 363 defined_(texture->IsDefined()) {
364 DCHECK_IMPLIES(image_buffer_.get(), defined_); 364 DCHECK(!image_buffer_.get() || defined_);
365 if (!image_buffer_.get() && defined_) { 365 if (!image_buffer_.get() && defined_) {
366 image_buffer_ = NativeImageBuffer::Create(texture->service_id()); 366 image_buffer_ = NativeImageBuffer::Create(texture->service_id());
367 DCHECK(image_buffer_.get()); 367 DCHECK(image_buffer_.get());
368 } 368 }
369 369
370 const Texture::FaceInfo& first_face = texture->face_infos_[0]; 370 const Texture::FaceInfo& first_face = texture->face_infos_[0];
371 if (image_buffer_.get()) { 371 if (image_buffer_.get()) {
372 scoped_refptr<gfx::GLImage> gl_image( 372 scoped_refptr<gfx::GLImage> gl_image(
373 new GLImageSync(image_buffer_, 373 new GLImageSync(image_buffer_,
374 gfx::Size(first_face.level_infos[0].width, 374 gfx::Size(first_face.level_infos[0].width,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 return true; 488 return true;
489 } 489 }
490 490
491 bool TextureDefinition::SafeToRenderFrom() const { 491 bool TextureDefinition::SafeToRenderFrom() const {
492 return level_info_.cleared_rect.Contains( 492 return level_info_.cleared_rect.Contains(
493 gfx::Rect(level_info_.width, level_info_.height)); 493 gfx::Rect(level_info_.width, level_info_.height));
494 } 494 }
495 495
496 } // namespace gles2 496 } // namespace gles2
497 } // namespace gpu 497 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_sync.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698