| 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 "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 void SkCanvas::onPushCull(const SkRect& cullRect) { | 1060 void SkCanvas::onPushCull(const SkRect& cullRect) { |
| 1061 // do nothing. Subclasses may do something | 1061 // do nothing. Subclasses may do something |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 void SkCanvas::onPopCull() { | 1064 void SkCanvas::onPopCull() { |
| 1065 // do nothing. Subclasses may do something | 1065 // do nothing. Subclasses may do something |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 void SkCanvas::internalPrivate_PreLoad(const SkBitmap& bitmap, const SkIRect& re
ct) { |
| 1069 SkBaseDevice* device = this->getDevice(); |
| 1070 if (NULL != device) { |
| 1071 device->internalPrivate_PreLoad(bitmap, rect); |
| 1072 } |
| 1073 } |
| 1074 |
| 1068 ///////////////////////////////////////////////////////////////////////////// | 1075 ///////////////////////////////////////////////////////////////////////////// |
| 1069 | 1076 |
| 1070 void SkCanvas::internalDrawBitmap(const SkBitmap& bitmap, | 1077 void SkCanvas::internalDrawBitmap(const SkBitmap& bitmap, |
| 1071 const SkMatrix& matrix, const SkPaint* paint) { | 1078 const SkMatrix& matrix, const SkPaint* paint) { |
| 1072 if (bitmap.drawsNothing()) { | 1079 if (bitmap.drawsNothing()) { |
| 1073 return; | 1080 return; |
| 1074 } | 1081 } |
| 1075 | 1082 |
| 1076 SkLazyPaint lazy; | 1083 SkLazyPaint lazy; |
| 1077 if (NULL == paint) { | 1084 if (NULL == paint) { |
| (...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2451 if (!bitmap.allocPixels(info)) { | 2458 if (!bitmap.allocPixels(info)) { |
| 2452 return NULL; | 2459 return NULL; |
| 2453 } | 2460 } |
| 2454 | 2461 |
| 2455 // should this functionality be moved into allocPixels()? | 2462 // should this functionality be moved into allocPixels()? |
| 2456 if (!bitmap.info().isOpaque()) { | 2463 if (!bitmap.info().isOpaque()) { |
| 2457 bitmap.eraseColor(0); | 2464 bitmap.eraseColor(0); |
| 2458 } | 2465 } |
| 2459 return SkNEW_ARGS(SkCanvas, (bitmap)); | 2466 return SkNEW_ARGS(SkCanvas, (bitmap)); |
| 2460 } | 2467 } |
| OLD | NEW |