| OLD | NEW |
| 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 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 SkASSERT(fPixelRefOrigin.fY >= 0); | 1672 SkASSERT(fPixelRefOrigin.fY >= 0); |
| 1673 SkASSERT(fPixelRef->info().width() >= (int)this->width() + fPixelRefOrig
in.fX); | 1673 SkASSERT(fPixelRef->info().width() >= (int)this->width() + fPixelRefOrig
in.fX); |
| 1674 SkASSERT(fPixelRef->info().fHeight >= (int)this->height() + fPixelRefOri
gin.fY); | 1674 SkASSERT(fPixelRef->info().fHeight >= (int)this->height() + fPixelRefOri
gin.fY); |
| 1675 SkASSERT(fPixelRef->rowBytes() >= fInfo.minRowBytes()); | 1675 SkASSERT(fPixelRef->rowBytes() >= fInfo.minRowBytes()); |
| 1676 } else { | 1676 } else { |
| 1677 SkASSERT(NULL == fColorTable); | 1677 SkASSERT(NULL == fColorTable); |
| 1678 } | 1678 } |
| 1679 } | 1679 } |
| 1680 #endif | 1680 #endif |
| 1681 | 1681 |
| 1682 #ifdef SK_DEVELOPER | 1682 #ifndef SK_IGNORE_TO_STRING |
| 1683 void SkBitmap::toString(SkString* str) const { | 1683 void SkBitmap::toString(SkString* str) const { |
| 1684 | 1684 |
| 1685 static const char* gConfigNames[kConfigCount] = { | 1685 static const char* gConfigNames[kConfigCount] = { |
| 1686 "NONE", "A8", "INDEX8", "565", "4444", "8888" | 1686 "NONE", "A8", "INDEX8", "565", "4444", "8888" |
| 1687 }; | 1687 }; |
| 1688 | 1688 |
| 1689 str->appendf("bitmap: ((%d, %d) %s", this->width(), this->height(), | 1689 str->appendf("bitmap: ((%d, %d) %s", this->width(), this->height(), |
| 1690 gConfigNames[this->config()]); | 1690 gConfigNames[this->config()]); |
| 1691 | 1691 |
| 1692 str->append(" ("); | 1692 str->append(" ("); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1722 /////////////////////////////////////////////////////////////////////////////// | 1722 /////////////////////////////////////////////////////////////////////////////// |
| 1723 | 1723 |
| 1724 #ifdef SK_DEBUG | 1724 #ifdef SK_DEBUG |
| 1725 void SkImageInfo::validate() const { | 1725 void SkImageInfo::validate() const { |
| 1726 SkASSERT(fWidth >= 0); | 1726 SkASSERT(fWidth >= 0); |
| 1727 SkASSERT(fHeight >= 0); | 1727 SkASSERT(fHeight >= 0); |
| 1728 SkASSERT(SkColorTypeIsValid(fColorType)); | 1728 SkASSERT(SkColorTypeIsValid(fColorType)); |
| 1729 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); | 1729 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); |
| 1730 } | 1730 } |
| 1731 #endif | 1731 #endif |
| OLD | NEW |