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

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

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 : version_(version), 327 : version_(version),
328 target_(texture->target()), 328 target_(texture->target()),
329 image_buffer_(image_buffer), 329 image_buffer_(image_buffer),
330 min_filter_(texture->min_filter()), 330 min_filter_(texture->min_filter()),
331 mag_filter_(texture->mag_filter()), 331 mag_filter_(texture->mag_filter()),
332 wrap_s_(texture->wrap_s()), 332 wrap_s_(texture->wrap_s()),
333 wrap_t_(texture->wrap_t()), 333 wrap_t_(texture->wrap_t()),
334 usage_(texture->usage()), 334 usage_(texture->usage()),
335 immutable_(texture->IsImmutable()), 335 immutable_(texture->IsImmutable()),
336 defined_(texture->IsDefined()) { 336 defined_(texture->IsDefined()) {
337 DCHECK(!image_buffer_.get() || defined_); 337 DCHECK_IMPLIES(image_buffer_.get(), defined_);
338 if (!image_buffer_.get() && defined_) { 338 if (!image_buffer_.get() && defined_) {
339 image_buffer_ = NativeImageBuffer::Create(texture->service_id()); 339 image_buffer_ = NativeImageBuffer::Create(texture->service_id());
340 DCHECK(image_buffer_.get()); 340 DCHECK(image_buffer_.get());
341 } 341 }
342 342
343 const Texture::FaceInfo& first_face = texture->face_infos_[0]; 343 const Texture::FaceInfo& first_face = texture->face_infos_[0];
344 if (image_buffer_.get()) { 344 if (image_buffer_.get()) {
345 scoped_refptr<gfx::GLImage> gl_image( 345 scoped_refptr<gfx::GLImage> gl_image(
346 new GLImageSync(image_buffer_, 346 new GLImageSync(image_buffer_,
347 gfx::Size(first_face.level_infos[0].width, 347 gfx::Size(first_face.level_infos[0].width,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 return true; 455 return true;
456 } 456 }
457 457
458 bool TextureDefinition::SafeToRenderFrom() const { 458 bool TextureDefinition::SafeToRenderFrom() const {
459 return level_info_.cleared_rect.Contains( 459 return level_info_.cleared_rect.Contains(
460 gfx::Rect(level_info_.width, level_info_.height)); 460 gfx::Rect(level_info_.width, level_info_.height));
461 } 461 }
462 462
463 } // namespace gles2 463 } // namespace gles2
464 } // namespace gpu 464 } // 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