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 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2069 if (!path.isInverseFillType() && paint.canComputeFastBounds()) { | 2069 if (!path.isInverseFillType() && paint.canComputeFastBounds()) { |
2070 const SkRect& pathBounds = path.getBounds(); | 2070 const SkRect& pathBounds = path.getBounds(); |
2071 bounds = &paint.computeFastBounds(pathBounds, &storage); | 2071 bounds = &paint.computeFastBounds(pathBounds, &storage); |
2072 if (this->quickReject(*bounds)) { | 2072 if (this->quickReject(*bounds)) { |
2073 return; | 2073 return; |
2074 } | 2074 } |
2075 } | 2075 } |
2076 | 2076 |
2077 const SkRect& r = path.getBounds(); | 2077 const SkRect& r = path.getBounds(); |
2078 if (r.width() <= 0 && r.height() <= 0) { | 2078 if (r.width() <= 0 && r.height() <= 0) { |
2079 if (path.isInverseFillType() && SkPaint::kFill_Style == paint.getStyle()
) { | 2079 if (path.isInverseFillType()) { |
2080 this->internalDrawPaint(paint); | 2080 this->internalDrawPaint(paint); |
2081 } | 2081 } |
2082 return; | 2082 return; |
2083 } | 2083 } |
2084 | 2084 |
2085 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) | 2085 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) |
2086 | 2086 |
2087 while (iter.next()) { | 2087 while (iter.next()) { |
2088 iter.fDevice->drawPath(iter, path, looper.paint()); | 2088 iter.fDevice->drawPath(iter, path, looper.paint()); |
2089 } | 2089 } |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2650 if (!supported_for_raster_canvas(info)) { | 2650 if (!supported_for_raster_canvas(info)) { |
2651 return NULL; | 2651 return NULL; |
2652 } | 2652 } |
2653 | 2653 |
2654 SkBitmap bitmap; | 2654 SkBitmap bitmap; |
2655 if (!bitmap.installPixels(info, pixels, rowBytes)) { | 2655 if (!bitmap.installPixels(info, pixels, rowBytes)) { |
2656 return NULL; | 2656 return NULL; |
2657 } | 2657 } |
2658 return SkNEW_ARGS(SkCanvas, (bitmap)); | 2658 return SkNEW_ARGS(SkCanvas, (bitmap)); |
2659 } | 2659 } |
OLD | NEW |