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

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

Issue 158893005: remove SK_SUPPORT_LEGACY_ONLOCKPIXELS completely (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkPixelRef.h ('k') | src/core/SkPixelRef.cpp » ('j') | 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 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 allFlags |= kHasHardwareMipMap_Flag; 1670 allFlags |= kHasHardwareMipMap_Flag;
1671 #endif 1671 #endif
1672 SkASSERT(fFlags <= allFlags); 1672 SkASSERT(fFlags <= allFlags);
1673 SkASSERT(fPixelLockCount >= 0); 1673 SkASSERT(fPixelLockCount >= 0);
1674 SkASSERT((uint8_t)ComputeBytesPerPixel((Config)fConfig) == fBytesPerPixel); 1674 SkASSERT((uint8_t)ComputeBytesPerPixel((Config)fConfig) == fBytesPerPixel);
1675 1675
1676 if (fPixels) { 1676 if (fPixels) {
1677 SkASSERT(fPixelRef); 1677 SkASSERT(fPixelRef);
1678 SkASSERT(fPixelLockCount > 0); 1678 SkASSERT(fPixelLockCount > 0);
1679 SkASSERT(fPixelRef->isLocked()); 1679 SkASSERT(fPixelRef->isLocked());
1680 #if !defined(SK_SUPPORT_LEGACY_ONLOCKPIXELS)
1681 SkASSERT(fPixelRef->rowBytes() == fRowBytes); 1680 SkASSERT(fPixelRef->rowBytes() == fRowBytes);
1682 #endif
1683 SkASSERT(fPixelRefOrigin.fX >= 0); 1681 SkASSERT(fPixelRefOrigin.fX >= 0);
1684 SkASSERT(fPixelRefOrigin.fY >= 0); 1682 SkASSERT(fPixelRefOrigin.fY >= 0);
1685 SkASSERT(fPixelRef->info().fWidth >= (int)fWidth + fPixelRefOrigin.fX); 1683 SkASSERT(fPixelRef->info().fWidth >= (int)fWidth + fPixelRefOrigin.fX);
1686 SkASSERT(fPixelRef->info().fHeight >= (int)fHeight + fPixelRefOrigin.fY) ; 1684 SkASSERT(fPixelRef->info().fHeight >= (int)fHeight + fPixelRefOrigin.fY) ;
1687 #if !defined(SK_SUPPORT_LEGACY_ONLOCKPIXELS)
1688 SkASSERT(fPixelRef->rowBytes() >= fWidth * fBytesPerPixel); 1685 SkASSERT(fPixelRef->rowBytes() >= fWidth * fBytesPerPixel);
1689 #endif
1690 } else { 1686 } else {
1691 SkASSERT(NULL == fColorTable); 1687 SkASSERT(NULL == fColorTable);
1692 } 1688 }
1693 } 1689 }
1694 #endif 1690 #endif
1695 1691
1696 #ifdef SK_DEVELOPER 1692 #ifdef SK_DEVELOPER
1697 void SkBitmap::toString(SkString* str) const { 1693 void SkBitmap::toString(SkString* str) const {
1698 1694
1699 static const char* gConfigNames[kConfigCount] = { 1695 static const char* gConfigNames[kConfigCount] = {
(...skipping 25 matching lines...) Expand all
1725 if (NULL != uri) { 1721 if (NULL != uri) {
1726 str->appendf(" uri:\"%s\"", uri); 1722 str->appendf(" uri:\"%s\"", uri);
1727 } else { 1723 } else {
1728 str->appendf(" pixelref:%p", pr); 1724 str->appendf(" pixelref:%p", pr);
1729 } 1725 }
1730 } 1726 }
1731 1727
1732 str->append(")"); 1728 str->append(")");
1733 } 1729 }
1734 #endif 1730 #endif
OLDNEW
« no previous file with comments | « include/core/SkPixelRef.h ('k') | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698