| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
| 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 #ifndef GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
| 9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 this->onDrawRect(rect, matrix, localRect, localMatrix); | 355 this->onDrawRect(rect, matrix, localRect, localMatrix); |
| 356 } | 356 } |
| 357 | 357 |
| 358 /** | 358 /** |
| 359 * Helper for drawRect when the caller doesn't need separate local rects or
matrices. | 359 * Helper for drawRect when the caller doesn't need separate local rects or
matrices. |
| 360 */ | 360 */ |
| 361 void drawSimpleRect(const SkRect& rect, const SkMatrix* matrix = NULL) { | 361 void drawSimpleRect(const SkRect& rect, const SkMatrix* matrix = NULL) { |
| 362 this->drawRect(rect, matrix, NULL, NULL); | 362 this->drawRect(rect, matrix, NULL, NULL); |
| 363 } | 363 } |
| 364 void drawSimpleRect(const SkIRect& irect, const SkMatrix* matrix = NULL) { | 364 void drawSimpleRect(const SkIRect& irect, const SkMatrix* matrix = NULL) { |
| 365 SkRect rect = SkRect::MakeFromIRect(irect); | 365 SkRect rect = SkRect::Make(irect); |
| 366 this->drawRect(rect, matrix, NULL, NULL); | 366 this->drawRect(rect, matrix, NULL, NULL); |
| 367 } | 367 } |
| 368 | 368 |
| 369 /** | 369 /** |
| 370 * This call is used to draw multiple instances of some geometry with a | 370 * This call is used to draw multiple instances of some geometry with a |
| 371 * given number of vertices (V) and indices (I) per-instance. The indices in | 371 * given number of vertices (V) and indices (I) per-instance. The indices in |
| 372 * the index source must have the form i[k+I] == i[k] + V. Also, all indices | 372 * the index source must have the form i[k+I] == i[k] + V. Also, all indices |
| 373 * i[kI] ... i[(k+1)I-1] must be elements of the range kV ... (k+1)V-1. As a | 373 * i[kI] ... i[(k+1)I-1] must be elements of the range kV ... (k+1)V-1. As a |
| 374 * concrete example, the following index buffer for drawing a series of | 374 * concrete example, the following index buffer for drawing a series of |
| 375 * quads each as two triangles each satisfies these conditions with V=4 and | 375 * quads each as two triangles each satisfies these conditions with V=4 and |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 const GrClipData* fClip; | 875 const GrClipData* fClip; |
| 876 GrDrawState* fDrawState; | 876 GrDrawState* fDrawState; |
| 877 GrDrawState fDefaultDraw
State; | 877 GrDrawState fDefaultDraw
State; |
| 878 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. | 878 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. |
| 879 GrContext* fContext; | 879 GrContext* fContext; |
| 880 | 880 |
| 881 typedef SkRefCnt INHERITED; | 881 typedef SkRefCnt INHERITED; |
| 882 }; | 882 }; |
| 883 | 883 |
| 884 #endif | 884 #endif |
| OLD | NEW |