OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
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 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 const SkPaint& paint) SK_OVERRIDE; | 77 const SkPaint& paint) SK_OVERRIDE; |
78 virtual void drawOval(const SkDraw&, const SkRect& oval, | 78 virtual void drawOval(const SkDraw&, const SkRect& oval, |
79 const SkPaint& paint) SK_OVERRIDE; | 79 const SkPaint& paint) SK_OVERRIDE; |
80 virtual void drawPath(const SkDraw&, const SkPath& path, | 80 virtual void drawPath(const SkDraw&, const SkPath& path, |
81 const SkPaint& paint, const SkMatrix* prePathMatrix, | 81 const SkPaint& paint, const SkMatrix* prePathMatrix, |
82 bool pathIsMutable) SK_OVERRIDE; | 82 bool pathIsMutable) SK_OVERRIDE; |
83 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, | 83 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, |
84 const SkMatrix&, const SkPaint&) SK_OVERRIDE; | 84 const SkMatrix&, const SkPaint&) SK_OVERRIDE; |
85 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, | 85 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, |
86 const SkRect* srcOrNull, const SkRect& dst, | 86 const SkRect* srcOrNull, const SkRect& dst, |
87 const SkPaint& paint) SK_OVERRIDE; | 87 const SkPaint& paint, |
| 88 SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE
; |
88 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, | 89 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, |
89 int x, int y, const SkPaint& paint); | 90 int x, int y, const SkPaint& paint); |
90 virtual void drawText(const SkDraw&, const void* text, size_t len, | 91 virtual void drawText(const SkDraw&, const void* text, size_t len, |
91 SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE; | 92 SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE; |
92 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 93 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
93 const SkScalar pos[], SkScalar constY, | 94 const SkScalar pos[], SkScalar constY, |
94 int scalarsPerPos, const SkPaint&) SK_OVERRIDE; | 95 int scalarsPerPos, const SkPaint&) SK_OVERRIDE; |
95 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, | 96 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
96 const SkPath& path, const SkMatrix* matrix, | 97 const SkPath& path, const SkMatrix* matrix, |
97 const SkPaint&) SK_OVERRIDE; | 98 const SkPaint&) SK_OVERRIDE; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // SkDraw's matrix and draw in device coords. | 157 // SkDraw's matrix and draw in device coords. |
157 void prepareDraw(const SkDraw&, bool forceIdentity); | 158 void prepareDraw(const SkDraw&, bool forceIdentity); |
158 | 159 |
159 /** | 160 /** |
160 * Implementation for both drawBitmap and drawBitmapRect. | 161 * Implementation for both drawBitmap and drawBitmapRect. |
161 */ | 162 */ |
162 void drawBitmapCommon(const SkDraw&, | 163 void drawBitmapCommon(const SkDraw&, |
163 const SkBitmap& bitmap, | 164 const SkBitmap& bitmap, |
164 const SkRect* srcRectPtr, | 165 const SkRect* srcRectPtr, |
165 const SkMatrix&, | 166 const SkMatrix&, |
166 const SkPaint&); | 167 const SkPaint&, |
| 168 SkCanvas::DrawBitmapRectFlags flags); |
167 | 169 |
168 /** | 170 /** |
169 * Helper functions called by drawBitmapCommon. By the time these are called
the SkDraw's | 171 * Helper functions called by drawBitmapCommon. By the time these are called
the SkDraw's |
170 * matrix has already been set on GrContext | 172 * matrix has already been set on GrContext |
171 */ | 173 */ |
172 bool shouldTileBitmap(const SkBitmap& bitmap, | 174 bool shouldTileBitmap(const SkBitmap& bitmap, |
173 const GrTextureParams& sampler, | 175 const GrTextureParams& sampler, |
174 const SkRect* srcRectPtr) const; | 176 const SkRect* srcRectPtr) const; |
175 void internalDrawBitmap(const SkBitmap&, | 177 void internalDrawBitmap(const SkBitmap&, |
176 const SkRect&, | 178 const SkRect&, |
177 const SkMatrix&, | 179 const SkMatrix&, |
178 const GrTextureParams& params, | 180 const GrTextureParams& params, |
179 const SkPaint& paint); | 181 const SkPaint& paint, |
| 182 SkCanvas::DrawBitmapRectFlags flags); |
180 void drawTiledBitmap(const SkBitmap& bitmap, | 183 void drawTiledBitmap(const SkBitmap& bitmap, |
181 const SkRect& srcRect, | 184 const SkRect& srcRect, |
182 const SkMatrix& m, | 185 const SkMatrix& m, |
183 const GrTextureParams& params, | 186 const GrTextureParams& params, |
184 const SkPaint& paint); | 187 const SkPaint& paint, |
| 188 SkCanvas::DrawBitmapRectFlags flags); |
185 | 189 |
186 /** | 190 /** |
187 * Returns non-initialized instance. | 191 * Returns non-initialized instance. |
188 */ | 192 */ |
189 GrTextContext* getTextContext(); | 193 GrTextContext* getTextContext(); |
190 | 194 |
191 typedef SkDevice INHERITED; | 195 typedef SkDevice INHERITED; |
192 }; | 196 }; |
193 | 197 |
194 #endif | 198 #endif |
OLD | NEW |