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

Side by Side Diff: Source/core/html/canvas/WebGLTexture.cpp

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use nullptr Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (m_info.size() > 1 && !m_isCubeComplete) 371 if (m_info.size() > 1 && !m_isCubeComplete)
372 m_needToUseBlackTexture = true; 372 m_needToUseBlackTexture = true;
373 // Completeness 373 // Completeness
374 if (!m_isComplete && m_minFilter != GL_NEAREST && m_minFilter != GL_LINEAR) 374 if (!m_isComplete && m_minFilter != GL_NEAREST && m_minFilter != GL_LINEAR)
375 m_needToUseBlackTexture = true; 375 m_needToUseBlackTexture = true;
376 } 376 }
377 377
378 const WebGLTexture::LevelInfo* WebGLTexture::getLevelInfo(GLenum target, GLint l evel) const 378 const WebGLTexture::LevelInfo* WebGLTexture::getLevelInfo(GLenum target, GLint l evel) const
379 { 379 {
380 if (!object() || !m_target) 380 if (!object() || !m_target)
381 return 0; 381 return nullptr;
382 int targetIndex = mapTargetToIndex(target); 382 int targetIndex = mapTargetToIndex(target);
383 if (targetIndex < 0 || targetIndex >= static_cast<int>(m_info.size())) 383 if (targetIndex < 0 || targetIndex >= static_cast<int>(m_info.size()))
384 return 0; 384 return nullptr;
385 if (level < 0 || level >= static_cast<GLint>(m_info[targetIndex].size())) 385 if (level < 0 || level >= static_cast<GLint>(m_info[targetIndex].size()))
386 return 0; 386 return nullptr;
387 return &(m_info[targetIndex][level]); 387 return &(m_info[targetIndex][level]);
388 } 388 }
389 389
390 } 390 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698