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

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

Issue 178003002: Fix compile errors in legacy copyTo(). (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/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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 return true; 977 return true;
978 } 978 }
979 979
980 /////////////////////////////////////////////////////////////////////////////// 980 ///////////////////////////////////////////////////////////////////////////////
981 981
982 #include "SkCanvas.h" 982 #include "SkCanvas.h"
983 #include "SkPaint.h" 983 #include "SkPaint.h"
984 984
985 #ifdef SK_SUPPORT_LEGACY_COPYTO_CONFIG 985 #ifdef SK_SUPPORT_LEGACY_COPYTO_CONFIG
986 bool SkBitmap::copyTo(SkBitmap* dst, Config c, Allocator* allocator) const { 986 bool SkBitmap::copyTo(SkBitmap* dst, Config c, Allocator* allocator) const {
987 return this->copyTo(dst, SkBitmapConfigToSkColorType(c), allocator); 987 return this->copyTo(dst, SkBitmapConfigToColorType(c), allocator);
988 } 988 }
989 989
990 bool SkBitmap::canCopyTo(Config newConfig) const { 990 bool SkBitmap::canCopyTo(Config newConfig) const {
991 return this->canCopyTo(SkBitmapConfigToSkColorType(c)); 991 return this->canCopyTo(SkBitmapConfigToColorType(newConfig));
992 } 992 }
993 #endif 993 #endif
994 994
995 bool SkBitmap::canCopyTo(SkColorType dstColorType) const { 995 bool SkBitmap::canCopyTo(SkColorType dstColorType) const {
996 if (this->colorType() == kUnknown_SkColorType) { 996 if (this->colorType() == kUnknown_SkColorType) {
997 return false; 997 return false;
998 } 998 }
999 999
1000 bool sameConfigs = (this->colorType() == dstColorType); 1000 bool sameConfigs = (this->colorType() == dstColorType);
1001 switch (dstColorType) { 1001 switch (dstColorType) {
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 /////////////////////////////////////////////////////////////////////////////// 1735 ///////////////////////////////////////////////////////////////////////////////
1736 1736
1737 #ifdef SK_DEBUG 1737 #ifdef SK_DEBUG
1738 void SkImageInfo::validate() const { 1738 void SkImageInfo::validate() const {
1739 SkASSERT(fWidth >= 0); 1739 SkASSERT(fWidth >= 0);
1740 SkASSERT(fHeight >= 0); 1740 SkASSERT(fHeight >= 0);
1741 SkASSERT(SkColorTypeIsValid(fColorType)); 1741 SkASSERT(SkColorTypeIsValid(fColorType));
1742 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); 1742 SkASSERT(SkAlphaTypeIsValid(fAlphaType));
1743 } 1743 }
1744 #endif 1744 #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