| 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 } | 1166 } |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 if (this->getTexture()) { | 1169 if (this->getTexture()) { |
| 1170 return false; | 1170 return false; |
| 1171 } else { | 1171 } else { |
| 1172 return this->copyTo(dst, dstConfig, NULL); | 1172 return this->copyTo(dst, dstConfig, NULL); |
| 1173 } | 1173 } |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 bool SkBitmap::deepCopyTo(SkBitmap* dst) const { |
| 1177 return this->deepCopyTo(dst, this->config()); |
| 1178 } |
| 1179 |
| 1176 /////////////////////////////////////////////////////////////////////////////// | 1180 /////////////////////////////////////////////////////////////////////////////// |
| 1177 /////////////////////////////////////////////////////////////////////////////// | 1181 /////////////////////////////////////////////////////////////////////////////// |
| 1178 | 1182 |
| 1179 static void downsampleby2_proc32(SkBitmap* dst, int x, int y, | 1183 static void downsampleby2_proc32(SkBitmap* dst, int x, int y, |
| 1180 const SkBitmap& src) { | 1184 const SkBitmap& src) { |
| 1181 x <<= 1; | 1185 x <<= 1; |
| 1182 y <<= 1; | 1186 y <<= 1; |
| 1183 const SkPMColor* p = src.getAddr32(x, y); | 1187 const SkPMColor* p = src.getAddr32(x, y); |
| 1184 const SkPMColor* baseP = p; | 1188 const SkPMColor* baseP = p; |
| 1185 SkPMColor c, ag, rb; | 1189 SkPMColor c, ag, rb; |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1714 /////////////////////////////////////////////////////////////////////////////// | 1718 /////////////////////////////////////////////////////////////////////////////// |
| 1715 | 1719 |
| 1716 #ifdef SK_DEBUG | 1720 #ifdef SK_DEBUG |
| 1717 void SkImageInfo::validate() const { | 1721 void SkImageInfo::validate() const { |
| 1718 SkASSERT(fWidth >= 0); | 1722 SkASSERT(fWidth >= 0); |
| 1719 SkASSERT(fHeight >= 0); | 1723 SkASSERT(fHeight >= 0); |
| 1720 SkASSERT(SkColorTypeIsValid(fColorType)); | 1724 SkASSERT(SkColorTypeIsValid(fColorType)); |
| 1721 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); | 1725 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); |
| 1722 } | 1726 } |
| 1723 #endif | 1727 #endif |
| OLD | NEW |