OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "SkDraw.h" | 9 #include "SkDraw.h" |
10 #include "SkBlitter.h" | 10 #include "SkBlitter.h" |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 const SkPaint& origPaint) const { | 1253 const SkPaint& origPaint) const { |
1254 SkDEBUGCODE(this->validate();) | 1254 SkDEBUGCODE(this->validate();) |
1255 | 1255 |
1256 // nothing to draw | 1256 // nothing to draw |
1257 if (fRC->isEmpty() || | 1257 if (fRC->isEmpty() || |
1258 bitmap.width() == 0 || bitmap.height() == 0 || | 1258 bitmap.width() == 0 || bitmap.height() == 0 || |
1259 bitmap.getConfig() == SkBitmap::kNo_Config) { | 1259 bitmap.getConfig() == SkBitmap::kNo_Config) { |
1260 return; | 1260 return; |
1261 } | 1261 } |
1262 | 1262 |
1263 #ifndef SK_ALLOW_OVER_32K_BITMAPS | |
1264 // run away on too-big bitmaps for now (exceed 16.16) | |
1265 if (bitmap.width() > 32767 || bitmap.height() > 32767) { | |
1266 return; | |
1267 } | |
1268 #endif | |
1269 | |
1270 SkPaint paint(origPaint); | 1263 SkPaint paint(origPaint); |
1271 paint.setStyle(SkPaint::kFill_Style); | 1264 paint.setStyle(SkPaint::kFill_Style); |
1272 | 1265 |
1273 SkMatrix matrix; | 1266 SkMatrix matrix; |
1274 if (!matrix.setConcat(*fMatrix, prematrix)) { | 1267 if (!matrix.setConcat(*fMatrix, prematrix)) { |
1275 return; | 1268 return; |
1276 } | 1269 } |
1277 | 1270 |
1278 if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) { | 1271 if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) { |
1279 return; | 1272 return; |
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2825 mask->fImage = SkMask::AllocImage(size); | 2818 mask->fImage = SkMask::AllocImage(size); |
2826 memset(mask->fImage, 0, mask->computeImageSize()); | 2819 memset(mask->fImage, 0, mask->computeImageSize()); |
2827 } | 2820 } |
2828 | 2821 |
2829 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2822 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
2830 draw_into_mask(*mask, devPath, style); | 2823 draw_into_mask(*mask, devPath, style); |
2831 } | 2824 } |
2832 | 2825 |
2833 return true; | 2826 return true; |
2834 } | 2827 } |
OLD | NEW |