| 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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkCanvasPriv.h" | 9 #include "SkCanvasPriv.h" |
| 10 #include "SkBitmapDevice.h" | 10 #include "SkBitmapDevice.h" |
| (...skipping 2177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 iter.fDevice->drawTextOnPath(iter, text, byteLength, path, | 2188 iter.fDevice->drawTextOnPath(iter, text, byteLength, path, |
| 2189 matrix, looper.paint()); | 2189 matrix, looper.paint()); |
| 2190 } | 2190 } |
| 2191 | 2191 |
| 2192 LOOPER_END | 2192 LOOPER_END |
| 2193 } | 2193 } |
| 2194 | 2194 |
| 2195 void SkCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 2195 void SkCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
| 2196 const SkPaint& paint) { | 2196 const SkPaint& paint) { |
| 2197 | 2197 |
| 2198 // FIXME: temporarily disable quickreject for empty bounds, | 2198 if (paint.canComputeFastBounds()) { |
| 2199 // pending implicit blob bounds implementation. | |
| 2200 if (!blob->bounds().isEmpty() && paint.canComputeFastBounds()) { | |
| 2201 SkRect storage; | 2199 SkRect storage; |
| 2202 | 2200 |
| 2203 if (this->quickReject(paint.computeFastBounds(blob->bounds().makeOffset(
x, y), &storage))) { | 2201 if (this->quickReject(paint.computeFastBounds(blob->bounds().makeOffset(
x, y), &storage))) { |
| 2204 return; | 2202 return; |
| 2205 } | 2203 } |
| 2206 } | 2204 } |
| 2207 | 2205 |
| 2208 LOOPER_BEGIN(paint, SkDrawFilter::kText_Type, NULL) | 2206 LOOPER_BEGIN(paint, SkDrawFilter::kText_Type, NULL) |
| 2209 | 2207 |
| 2210 while (iter.next()) { | 2208 while (iter.next()) { |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2552 } | 2550 } |
| 2553 | 2551 |
| 2554 if (matrix) { | 2552 if (matrix) { |
| 2555 canvas->concat(*matrix); | 2553 canvas->concat(*matrix); |
| 2556 } | 2554 } |
| 2557 } | 2555 } |
| 2558 | 2556 |
| 2559 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2557 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
| 2560 fCanvas->restoreToCount(fSaveCount); | 2558 fCanvas->restoreToCount(fSaveCount); |
| 2561 } | 2559 } |
| OLD | NEW |