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 | 8 |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1986 this->internalDrawBitmapNine(bitmap, center, dst, paint); | 1986 this->internalDrawBitmapNine(bitmap, center, dst, paint); |
1987 } | 1987 } |
1988 | 1988 |
1989 class SkDeviceFilteredPaint { | 1989 class SkDeviceFilteredPaint { |
1990 public: | 1990 public: |
1991 SkDeviceFilteredPaint(SkBaseDevice* device, const SkPaint& paint) { | 1991 SkDeviceFilteredPaint(SkBaseDevice* device, const SkPaint& paint) { |
1992 SkBaseDevice::TextFlags flags; | 1992 SkBaseDevice::TextFlags flags; |
1993 if (device->filterTextFlags(paint, &flags)) { | 1993 if (device->filterTextFlags(paint, &flags)) { |
1994 SkPaint* newPaint = fLazy.set(paint); | 1994 SkPaint* newPaint = fLazy.set(paint); |
1995 newPaint->setFlags(flags.fFlags); | 1995 newPaint->setFlags(flags.fFlags); |
1996 newPaint->setHinting(flags.fHinting); | |
1997 fPaint = newPaint; | 1996 fPaint = newPaint; |
1998 } else { | 1997 } else { |
1999 fPaint = &paint; | 1998 fPaint = &paint; |
2000 } | 1999 } |
2001 } | 2000 } |
2002 | 2001 |
2003 const SkPaint& paint() const { return *fPaint; } | 2002 const SkPaint& paint() const { return *fPaint; } |
2004 | 2003 |
2005 private: | 2004 private: |
2006 const SkPaint* fPaint; | 2005 const SkPaint* fPaint; |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 } | 2490 } |
2492 | 2491 |
2493 if (matrix) { | 2492 if (matrix) { |
2494 canvas->concat(*matrix); | 2493 canvas->concat(*matrix); |
2495 } | 2494 } |
2496 } | 2495 } |
2497 | 2496 |
2498 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2497 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2499 fCanvas->restoreToCount(fSaveCount); | 2498 fCanvas->restoreToCount(fSaveCount); |
2500 } | 2499 } |
OLD | NEW |