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

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

Issue 140903002: Hide bitmap rowbyes assert when LEGACY_ONLOCKPIXELS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: format Created 6 years, 11 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 | « no previous file | 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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 allFlags |= kHasHardwareMipMap_Flag; 1594 allFlags |= kHasHardwareMipMap_Flag;
1595 #endif 1595 #endif
1596 SkASSERT(fFlags <= allFlags); 1596 SkASSERT(fFlags <= allFlags);
1597 SkASSERT(fPixelLockCount >= 0); 1597 SkASSERT(fPixelLockCount >= 0);
1598 SkASSERT((uint8_t)ComputeBytesPerPixel((Config)fConfig) == fBytesPerPixel); 1598 SkASSERT((uint8_t)ComputeBytesPerPixel((Config)fConfig) == fBytesPerPixel);
1599 1599
1600 if (fPixels) { 1600 if (fPixels) {
1601 SkASSERT(fPixelRef); 1601 SkASSERT(fPixelRef);
1602 SkASSERT(fPixelLockCount > 0); 1602 SkASSERT(fPixelLockCount > 0);
1603 SkASSERT(fPixelRef->isLocked()); 1603 SkASSERT(fPixelRef->isLocked());
1604 #if !defined(SK_SUPPORT_LEGACY_ONLOCKPIXELS)
1604 SkASSERT(fPixelRef->rowBytes() == fRowBytes); 1605 SkASSERT(fPixelRef->rowBytes() == fRowBytes);
1606 #endif
1605 SkASSERT(fPixelRefOrigin.fX >= 0); 1607 SkASSERT(fPixelRefOrigin.fX >= 0);
1606 SkASSERT(fPixelRefOrigin.fY >= 0); 1608 SkASSERT(fPixelRefOrigin.fY >= 0);
1607 SkASSERT(fPixelRef->info().fWidth >= (int)fWidth + fPixelRefOrigin.fX); 1609 SkASSERT(fPixelRef->info().fWidth >= (int)fWidth + fPixelRefOrigin.fX);
1608 SkASSERT(fPixelRef->info().fHeight >= (int)fHeight + fPixelRefOrigin.fY) ; 1610 SkASSERT(fPixelRef->info().fHeight >= (int)fHeight + fPixelRefOrigin.fY) ;
1611 #if !defined(SK_SUPPORT_LEGACY_ONLOCKPIXELS)
1609 SkASSERT(fPixelRef->rowBytes() >= fWidth * fBytesPerPixel); 1612 SkASSERT(fPixelRef->rowBytes() >= fWidth * fBytesPerPixel);
1613 #endif
1610 } else { 1614 } else {
1611 SkASSERT(NULL == fColorTable); 1615 SkASSERT(NULL == fColorTable);
1612 } 1616 }
1613 } 1617 }
1614 #endif 1618 #endif
1615 1619
1616 #ifdef SK_DEVELOPER 1620 #ifdef SK_DEVELOPER
1617 void SkBitmap::toString(SkString* str) const { 1621 void SkBitmap::toString(SkString* str) const {
1618 1622
1619 static const char* gConfigNames[kConfigCount] = { 1623 static const char* gConfigNames[kConfigCount] = {
(...skipping 25 matching lines...) Expand all
1645 if (NULL != uri) { 1649 if (NULL != uri) {
1646 str->appendf(" uri:\"%s\"", uri); 1650 str->appendf(" uri:\"%s\"", uri);
1647 } else { 1651 } else {
1648 str->appendf(" pixelref:%p", pr); 1652 str->appendf(" pixelref:%p", pr);
1649 } 1653 }
1650 } 1654 }
1651 1655
1652 str->append(")"); 1656 str->append(")");
1653 } 1657 }
1654 #endif 1658 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698