Chromium Code Reviews| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 * Based on the paint's style, strokeWidth, and the matrix, classify how | 100 * Based on the paint's style, strokeWidth, and the matrix, classify how |
| 101 * to draw the rect. If no special-case is available, returns | 101 * to draw the rect. If no special-case is available, returns |
| 102 * kPath_RectType. | 102 * kPath_RectType. |
| 103 * | 103 * |
| 104 * Iff RectType == kStroke_RectType, then strokeSize is set to the device | 104 * Iff RectType == kStroke_RectType, then strokeSize is set to the device |
| 105 * width and height of the stroke. | 105 * width and height of the stroke. |
| 106 */ | 106 */ |
| 107 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, | 107 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, |
| 108 SkPoint* strokeSize); | 108 SkPoint* strokeSize); |
| 109 | 109 |
| 110 bool shouldDrawTextAsPaths(const SkPaint&, const SkMatrix&) const; | |
|
reed1
2013/11/25 21:24:34
why did this go from static to member?
| |
| 110 void drawText_asPaths(const char text[], size_t byteLength, | 111 void drawText_asPaths(const char text[], size_t byteLength, |
| 111 SkScalar x, SkScalar y, const SkPaint&) const; | 112 SkScalar x, SkScalar y, const SkPaint&) const; |
| 112 void drawPosText_asPaths(const char text[], size_t byteLength, | 113 void drawPosText_asPaths(const char text[], size_t byteLength, |
| 113 const SkScalar pos[], SkScalar constY, | 114 const SkScalar pos[], SkScalar constY, |
| 114 int scalarsPerPosition, const SkPaint&) const; | 115 int scalarsPerPosition, const SkPaint&) const; |
| 115 | 116 |
| 116 private: | 117 private: |
| 117 void drawDevMask(const SkMask& mask, const SkPaint&) const; | 118 void drawDevMask(const SkMask& mask, const SkPaint&) const; |
| 118 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; | 119 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; |
| 119 | 120 |
| 120 void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, | 121 void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, |
| 121 bool pathIsMutable, bool drawCoverage) const; | 122 bool pathIsMutable, bool drawCoverage) const; |
| 122 | 123 |
| 123 /** | 124 /** |
| 124 * Return the current clip bounds, in local coordinates, with slop to accou nt | 125 * Return the current clip bounds, in local coordinates, with slop to accou nt |
| 125 * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then | 126 * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then |
| 126 * run through the inverse of the matrix). | 127 * run through the inverse of the matrix). |
| 127 * | 128 * |
| 128 * If the matrix cannot be inverted, or the current clip is empty, return | 129 * If the matrix cannot be inverted, or the current clip is empty, return |
| 129 * false and ignore bounds parameter. | 130 * false and ignore bounds parameter. |
| 130 */ | 131 */ |
| 131 bool SK_WARN_UNUSED_RESULT | 132 bool SK_WARN_UNUSED_RESULT |
| 132 computeConservativeLocalClipBounds(SkRect* bounds) const; | 133 computeConservativeLocalClipBounds(SkRect* bounds) const; |
| 133 | 134 |
| 134 static bool ShouldDrawTextAsPaths(const SkPaint&, const SkMatrix&); | |
| 135 | |
| 136 public: | 135 public: |
| 137 const SkBitmap* fBitmap; // required | 136 const SkBitmap* fBitmap; // required |
| 138 const SkMatrix* fMatrix; // required | 137 const SkMatrix* fMatrix; // required |
| 139 const SkRegion* fClip; // DEPRECATED | 138 const SkRegion* fClip; // DEPRECATED |
| 140 const SkRasterClip* fRC; // required | 139 const SkRasterClip* fRC; // required |
| 141 | 140 |
| 142 const SkClipStack* fClipStack; // optional | 141 const SkClipStack* fClipStack; // optional |
| 143 SkBaseDevice* fDevice; // optional | 142 SkBaseDevice* fDevice; // optional |
| 144 SkBounder* fBounder; // optional | 143 SkBounder* fBounder; // optional |
| 145 SkDrawProcs* fProcs; // optional | 144 SkDrawProcs* fProcs; // optional |
| 146 | 145 |
| 147 #ifdef SK_DEBUG | 146 #ifdef SK_DEBUG |
| 148 void validate() const; | 147 void validate() const; |
| 149 #else | 148 #else |
| 150 void validate() const {} | 149 void validate() const {} |
| 151 #endif | 150 #endif |
| 152 }; | 151 }; |
| 153 | 152 |
| 154 #endif | 153 #endif |
| OLD | NEW |