| 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 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2079 if (!path.isInverseFillType() && paint.canComputeFastBounds()) { | 2079 if (!path.isInverseFillType() && paint.canComputeFastBounds()) { |
| 2080 const SkRect& pathBounds = path.getBounds(); | 2080 const SkRect& pathBounds = path.getBounds(); |
| 2081 bounds = &paint.computeFastBounds(pathBounds, &storage); | 2081 bounds = &paint.computeFastBounds(pathBounds, &storage); |
| 2082 if (this->quickReject(*bounds)) { | 2082 if (this->quickReject(*bounds)) { |
| 2083 return; | 2083 return; |
| 2084 } | 2084 } |
| 2085 } | 2085 } |
| 2086 | 2086 |
| 2087 const SkRect& r = path.getBounds(); | 2087 const SkRect& r = path.getBounds(); |
| 2088 if (r.width() <= 0 && r.height() <= 0) { | 2088 if (r.width() <= 0 && r.height() <= 0) { |
| 2089 if (path.isInverseFillType()) { | 2089 if (path.isInverseFillType() && SkPaint::kFill_Style == paint.getStyle()
) { |
| 2090 this->internalDrawPaint(paint); | 2090 this->internalDrawPaint(paint); |
| 2091 } | 2091 } |
| 2092 return; | 2092 return; |
| 2093 } | 2093 } |
| 2094 | 2094 |
| 2095 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) | 2095 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) |
| 2096 | 2096 |
| 2097 while (iter.next()) { | 2097 while (iter.next()) { |
| 2098 iter.fDevice->drawPath(iter, path, looper.paint()); | 2098 iter.fDevice->drawPath(iter, path, looper.paint()); |
| 2099 } | 2099 } |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2659 if (!bitmap.installPixels(info, pixels, rowBytes)) { | 2659 if (!bitmap.installPixels(info, pixels, rowBytes)) { |
| 2660 return NULL; | 2660 return NULL; |
| 2661 } | 2661 } |
| 2662 | 2662 |
| 2663 // should this functionality be moved into allocPixels()? | 2663 // should this functionality be moved into allocPixels()? |
| 2664 if (!bitmap.info().isOpaque()) { | 2664 if (!bitmap.info().isOpaque()) { |
| 2665 bitmap.eraseColor(0); | 2665 bitmap.eraseColor(0); |
| 2666 } | 2666 } |
| 2667 return SkNEW_ARGS(SkCanvas, (bitmap)); | 2667 return SkNEW_ARGS(SkCanvas, (bitmap)); |
| 2668 } | 2668 } |
| OLD | NEW |