| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrDrawContext_DEFINED | 8 #ifndef GrDrawContext_DEFINED |
| 9 #define GrDrawContext_DEFINED | 9 #define GrDrawContext_DEFINED |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 * mitered/beveled stroked based on stroke width. | 104 * mitered/beveled stroked based on stroke width. |
| 105 * The rects coords are used to access the paint (through texture matrix) | 105 * The rects coords are used to access the paint (through texture matrix) |
| 106 */ | 106 */ |
| 107 void drawRect(const GrClip&, | 107 void drawRect(const GrClip&, |
| 108 const GrPaint& paint, | 108 const GrPaint& paint, |
| 109 const SkMatrix& viewMatrix, | 109 const SkMatrix& viewMatrix, |
| 110 const SkRect&, | 110 const SkRect&, |
| 111 const GrStrokeInfo* strokeInfo = NULL); | 111 const GrStrokeInfo* strokeInfo = NULL); |
| 112 | 112 |
| 113 /** | 113 /** |
| 114 * Maps a rectangle of shader coordinates to a rectangle and draws that rect
angle | 114 * Maps a rectangle of shader coordinates to a rectangle and fills that rect
angle. |
| 115 * | 115 * |
| 116 * @param paint describes how to color pixels. | 116 * @param paint describes how to color pixels. |
| 117 * @param viewMatrix transformation matrix which applies to rectToDraw | 117 * @param viewMatrix transformation matrix which applies to rectToDraw |
| 118 * @param rectToDraw the rectangle to draw | 118 * @param rectToDraw the rectangle to draw |
| 119 * @param localRect the rectangle of shader coordinates applied to rectT
oDraw | 119 * @param localRect the rectangle of shader coordinates applied to rectT
oDraw |
| 120 */ | 120 */ |
| 121 void drawNonAARectToRect(const GrClip&, | 121 void fillRectToRect(const GrClip&, |
| 122 const GrPaint& paint, | 122 const GrPaint& paint, |
| 123 const SkMatrix& viewMatrix, | 123 const SkMatrix& viewMatrix, |
| 124 const SkRect& rectToDraw, | 124 const SkRect& rectToDraw, |
| 125 const SkRect& localRect); | 125 const SkRect& localRect); |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * Draws a non-AA rect with paint and a localMatrix | 128 * Fills a rect with a paint and a localMatrix. |
| 129 */ | 129 */ |
| 130 void drawNonAARectWithLocalMatrix(const GrClip& clip, | 130 void fillRectWithLocalMatrix(const GrClip& clip, |
| 131 const GrPaint& paint, | 131 const GrPaint& paint, |
| 132 const SkMatrix& viewMatrix, | 132 const SkMatrix& viewMatrix, |
| 133 const SkRect& rect, | 133 const SkRect& rect, |
| 134 const SkMatrix& localMatrix); | 134 const SkMatrix& localMatrix); |
| 135 | 135 |
| 136 /** | 136 /** |
| 137 * Draw a roundrect using a paint. | 137 * Draw a roundrect using a paint. |
| 138 * | 138 * |
| 139 * @param paint describes how to color pixels. | 139 * @param paint describes how to color pixels. |
| 140 * @param viewMatrix transformation matrix | 140 * @param viewMatrix transformation matrix |
| 141 * @param rrect the roundrect to draw | 141 * @param rrect the roundrect to draw |
| 142 * @param strokeInfo the stroke information (width, join, cap) and | 142 * @param strokeInfo the stroke information (width, join, cap) and |
| 143 * the dash information (intervals, count, phase). | 143 * the dash information (intervals, count, phase). |
| 144 */ | 144 */ |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked | 278 // In MDB-mode the drawTarget can be closed by some other drawContext that h
as picked |
| 279 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. | 279 // it up. For this reason, the drawTarget should only ever be accessed via '
getDrawTarget'. |
| 280 GrDrawTarget* fDrawTarget; | 280 GrDrawTarget* fDrawTarget; |
| 281 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 281 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
| 282 | 282 |
| 283 SkSurfaceProps fSurfaceProps; | 283 SkSurfaceProps fSurfaceProps; |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 #endif | 286 #endif |
| OLD | NEW |