| 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 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2423 const SkPath& path, SkScalar hOffset, | 2423 const SkPath& path, SkScalar hOffset, |
| 2424 SkScalar vOffset, const SkPaint& paint) { | 2424 SkScalar vOffset, const SkPaint& paint) { |
| 2425 TRACE_EVENT0("skia", "SkCanvas::drawTextOnPathHV()"); | 2425 TRACE_EVENT0("skia", "SkCanvas::drawTextOnPathHV()"); |
| 2426 SkMatrix matrix; | 2426 SkMatrix matrix; |
| 2427 | 2427 |
| 2428 matrix.setTranslate(hOffset, vOffset); | 2428 matrix.setTranslate(hOffset, vOffset); |
| 2429 this->drawTextOnPath(text, byteLength, path, &matrix, paint); | 2429 this->drawTextOnPath(text, byteLength, path, &matrix, paint); |
| 2430 } | 2430 } |
| 2431 | 2431 |
| 2432 /////////////////////////////////////////////////////////////////////////////// | 2432 /////////////////////////////////////////////////////////////////////////////// |
| 2433 void SkCanvas::EXPERIMENTAL_optimize(const SkPicture* picture) { | |
| 2434 SkBaseDevice* device = this->getDevice(); | |
| 2435 if (device) { | |
| 2436 device->EXPERIMENTAL_optimize(picture); | |
| 2437 } | |
| 2438 } | |
| 2439 | |
| 2440 void SkCanvas::drawPicture(const SkPicture* picture) { | 2433 void SkCanvas::drawPicture(const SkPicture* picture) { |
| 2441 TRACE_EVENT0("skia", "SkCanvas::drawPicture()"); | 2434 TRACE_EVENT0("skia", "SkCanvas::drawPicture()"); |
| 2442 if (picture) { | 2435 if (picture) { |
| 2443 this->onDrawPicture(picture, NULL, NULL); | 2436 this->onDrawPicture(picture, NULL, NULL); |
| 2444 } | 2437 } |
| 2445 } | 2438 } |
| 2446 | 2439 |
| 2447 void SkCanvas::drawPicture(const SkPicture* picture, const SkMatrix* matrix, con
st SkPaint* paint) { | 2440 void SkCanvas::drawPicture(const SkPicture* picture, const SkMatrix* matrix, con
st SkPaint* paint) { |
| 2448 TRACE_EVENT0("skia", "SkCanvas::drawPicture(SkMatrix, SkPaint)"); | 2441 TRACE_EVENT0("skia", "SkCanvas::drawPicture(SkMatrix, SkPaint)"); |
| 2449 if (picture) { | 2442 if (picture) { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2584 } | 2577 } |
| 2585 | 2578 |
| 2586 if (matrix) { | 2579 if (matrix) { |
| 2587 canvas->concat(*matrix); | 2580 canvas->concat(*matrix); |
| 2588 } | 2581 } |
| 2589 } | 2582 } |
| 2590 | 2583 |
| 2591 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2584 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
| 2592 fCanvas->restoreToCount(fSaveCount); | 2585 fCanvas->restoreToCount(fSaveCount); |
| 2593 } | 2586 } |
| OLD | NEW |