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

Side by Side Diff: src/core/SkBitmap.cpp

Issue 385943003: Remove unused kImageIsOpaque_Flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « include/core/SkBitmap.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 void SkBitmap::validate() const { 1310 void SkBitmap::validate() const {
1311 fInfo.validate(); 1311 fInfo.validate();
1312 1312
1313 // ImageInfo may not require this, but Bitmap ensures that opaque-only 1313 // ImageInfo may not require this, but Bitmap ensures that opaque-only
1314 // colorTypes report opaque for their alphatype 1314 // colorTypes report opaque for their alphatype
1315 if (kRGB_565_SkColorType == fInfo.colorType()) { 1315 if (kRGB_565_SkColorType == fInfo.colorType()) {
1316 SkASSERT(kOpaque_SkAlphaType == fInfo.alphaType()); 1316 SkASSERT(kOpaque_SkAlphaType == fInfo.alphaType());
1317 } 1317 }
1318 1318
1319 SkASSERT(fInfo.validRowBytes(fRowBytes)); 1319 SkASSERT(fInfo.validRowBytes(fRowBytes));
1320 uint8_t allFlags = kImageIsOpaque_Flag | kImageIsVolatile_Flag | kImageIsImm utable_Flag; 1320 uint8_t allFlags = kImageIsVolatile_Flag | kImageIsImmutable_Flag;
1321 #ifdef SK_BUILD_FOR_ANDROID 1321 #ifdef SK_BUILD_FOR_ANDROID
1322 allFlags |= kHasHardwareMipMap_Flag; 1322 allFlags |= kHasHardwareMipMap_Flag;
1323 #endif 1323 #endif
1324 SkASSERT(fFlags <= allFlags); 1324 SkASSERT(fFlags <= allFlags);
1325 SkASSERT(fPixelLockCount >= 0); 1325 SkASSERT(fPixelLockCount >= 0);
1326 1326
1327 if (fPixels) { 1327 if (fPixels) {
1328 SkASSERT(fPixelRef); 1328 SkASSERT(fPixelRef);
1329 SkASSERT(fPixelLockCount > 0); 1329 SkASSERT(fPixelLockCount > 0);
1330 SkASSERT(fPixelRef->isLocked()); 1330 SkASSERT(fPixelRef->isLocked());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 /////////////////////////////////////////////////////////////////////////////// 1383 ///////////////////////////////////////////////////////////////////////////////
1384 1384
1385 #ifdef SK_DEBUG 1385 #ifdef SK_DEBUG
1386 void SkImageInfo::validate() const { 1386 void SkImageInfo::validate() const {
1387 SkASSERT(fWidth >= 0); 1387 SkASSERT(fWidth >= 0);
1388 SkASSERT(fHeight >= 0); 1388 SkASSERT(fHeight >= 0);
1389 SkASSERT(SkColorTypeIsValid(fColorType)); 1389 SkASSERT(SkColorTypeIsValid(fColorType));
1390 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); 1390 SkASSERT(SkAlphaTypeIsValid(fAlphaType));
1391 } 1391 }
1392 #endif 1392 #endif
OLDNEW
« no previous file with comments | « include/core/SkBitmap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698