OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 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 #include "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2117 bounds = &paint.computeFastBounds(pathBounds, &storage); | 2117 bounds = &paint.computeFastBounds(pathBounds, &storage); |
2118 if (this->quickReject(*bounds)) { | 2118 if (this->quickReject(*bounds)) { |
2119 return; | 2119 return; |
2120 } | 2120 } |
2121 } | 2121 } |
2122 | 2122 |
2123 const SkRect& r = path.getBounds(); | 2123 const SkRect& r = path.getBounds(); |
2124 if (r.width() <= 0 && r.height() <= 0) { | 2124 if (r.width() <= 0 && r.height() <= 0) { |
2125 if (path.isInverseFillType()) { | 2125 if (path.isInverseFillType()) { |
2126 this->internalDrawPaint(paint); | 2126 this->internalDrawPaint(paint); |
2127 return; | |
2127 } | 2128 } |
2128 return; | 2129 if (path.hasOnlyMoveTos()) { |
reed1
2015/09/03 19:07:27
Is this test for correctness or for performance?
caryclark
2015/09/03 19:37:57
Correctness. Removing this test causes EmptyPath t
| |
2130 return; | |
2131 } | |
2129 } | 2132 } |
2130 | 2133 |
2131 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) | 2134 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) |
2132 | 2135 |
2133 while (iter.next()) { | 2136 while (iter.next()) { |
2134 iter.fDevice->drawPath(iter, path, looper.paint()); | 2137 iter.fDevice->drawPath(iter, path, looper.paint()); |
2135 } | 2138 } |
2136 | 2139 |
2137 LOOPER_END | 2140 LOOPER_END |
2138 } | 2141 } |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2897 } | 2900 } |
2898 | 2901 |
2899 if (matrix) { | 2902 if (matrix) { |
2900 canvas->concat(*matrix); | 2903 canvas->concat(*matrix); |
2901 } | 2904 } |
2902 } | 2905 } |
2903 | 2906 |
2904 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2907 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2905 fCanvas->restoreToCount(fSaveCount); | 2908 fCanvas->restoreToCount(fSaveCount); |
2906 } | 2909 } |
OLD | NEW |