| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 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 #ifndef SkDraw_DEFINED | 10 #ifndef SkDraw_DEFINED |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 */ | 96 */ |
| 97 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, | 97 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, |
| 98 SkPoint* strokeSize); | 98 SkPoint* strokeSize); |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 void drawText_asPaths(const char text[], size_t byteLength, | 101 void drawText_asPaths(const char text[], size_t byteLength, |
| 102 SkScalar x, SkScalar y, const SkPaint&) const; | 102 SkScalar x, SkScalar y, const SkPaint&) const; |
| 103 void drawDevMask(const SkMask& mask, const SkPaint&) const; | 103 void drawDevMask(const SkMask& mask, const SkPaint&) const; |
| 104 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; | 104 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; |
| 105 | 105 |
| 106 void drawPosText_asPaths(const char text[], size_t byteLength, |
| 107 const SkScalar pos[], SkScalar constY, |
| 108 int scalarsPerPosition, const SkPaint&) const; |
| 109 |
| 106 /** | 110 /** |
| 107 * Return the current clip bounds, in local coordinates, with slop to accou
nt | 111 * Return the current clip bounds, in local coordinates, with slop to accou
nt |
| 108 * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then | 112 * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then |
| 109 * run through the inverse of the matrix). | 113 * run through the inverse of the matrix). |
| 110 * | 114 * |
| 111 * If the matrix cannot be inverted, or the current clip is empty, return | 115 * If the matrix cannot be inverted, or the current clip is empty, return |
| 112 * false and ignore bounds parameter. | 116 * false and ignore bounds parameter. |
| 113 */ | 117 */ |
| 114 bool SK_WARN_UNUSED_RESULT | 118 bool SK_WARN_UNUSED_RESULT |
| 115 computeConservativeLocalClipBounds(SkRect* bounds) const; | 119 computeConservativeLocalClipBounds(SkRect* bounds) const; |
| 116 | 120 |
| 121 static bool ShouldDrawTextAsPaths(const SkPaint&, const SkMatrix&); |
| 122 |
| 117 public: | 123 public: |
| 118 const SkBitmap* fBitmap; // required | 124 const SkBitmap* fBitmap; // required |
| 119 const SkMatrix* fMatrix; // required | 125 const SkMatrix* fMatrix; // required |
| 120 const SkRegion* fClip; // DEPRECATED | 126 const SkRegion* fClip; // DEPRECATED |
| 121 const SkRasterClip* fRC; // required | 127 const SkRasterClip* fRC; // required |
| 122 | 128 |
| 123 const SkClipStack* fClipStack; // optional | 129 const SkClipStack* fClipStack; // optional |
| 124 SkDevice* fDevice; // optional | 130 SkDevice* fDevice; // optional |
| 125 SkBounder* fBounder; // optional | 131 SkBounder* fBounder; // optional |
| 126 SkDrawProcs* fProcs; // optional | 132 SkDrawProcs* fProcs; // optional |
| 127 | 133 |
| 128 #ifdef SK_DEBUG | 134 #ifdef SK_DEBUG |
| 129 void validate() const; | 135 void validate() const; |
| 130 #else | 136 #else |
| 131 void validate() const {} | 137 void validate() const {} |
| 132 #endif | 138 #endif |
| 133 }; | 139 }; |
| 134 | 140 |
| 135 #endif | 141 #endif |
| OLD | NEW |