| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 const SkRect&, | 113 const SkRect&, |
| 114 const GrStrokeInfo* strokeInfo = NULL); | 114 const GrStrokeInfo* strokeInfo = NULL); |
| 115 | 115 |
| 116 /** | 116 /** |
| 117 * Maps a rectangle of shader coordinates to a rectangle and draws that rect
angle | 117 * Maps a rectangle of shader coordinates to a rectangle and draws that rect
angle |
| 118 * | 118 * |
| 119 * @param paint describes how to color pixels. | 119 * @param paint describes how to color pixels. |
| 120 * @param viewMatrix transformation matrix which applies to rectToDraw | 120 * @param viewMatrix transformation matrix which applies to rectToDraw |
| 121 * @param rectToDraw the rectangle to draw | 121 * @param rectToDraw the rectangle to draw |
| 122 * @param localRect the rectangle of shader coordinates applied to rectT
oDraw | 122 * @param localRect the rectangle of shader coordinates applied to rectT
oDraw |
| 123 * @param localMatrix an optional matrix to transform the shader coordinat
es before applying | |
| 124 * to rectToDraw | |
| 125 */ | 123 */ |
| 126 void drawNonAARectToRect(GrRenderTarget*, | 124 void drawNonAARectToRect(GrRenderTarget*, |
| 127 const GrClip&, | 125 const GrClip&, |
| 128 const GrPaint& paint, | 126 const GrPaint& paint, |
| 129 const SkMatrix& viewMatrix, | 127 const SkMatrix& viewMatrix, |
| 130 const SkRect& rectToDraw, | 128 const SkRect& rectToDraw, |
| 131 const SkRect& localRect, | 129 const SkRect& localRect); |
| 132 const SkMatrix* localMatrix = NULL); | |
| 133 | 130 |
| 134 /** | 131 /** |
| 135 * Draws a non-AA rect with paint and a localMatrix | 132 * Draws a non-AA rect with paint and a localMatrix |
| 136 */ | 133 */ |
| 137 void drawNonAARectWithLocalMatrix(GrRenderTarget* rt, | 134 void drawNonAARectWithLocalMatrix(GrRenderTarget* rt, |
| 138 const GrClip& clip, | 135 const GrClip& clip, |
| 139 const GrPaint& paint, | 136 const GrPaint& paint, |
| 140 const SkMatrix& viewMatrix, | 137 const SkMatrix& viewMatrix, |
| 141 const SkRect& rect, | 138 const SkRect& rect, |
| 142 const SkMatrix& localMatrix) { | 139 const SkMatrix& localMatrix); |
| 143 this->drawNonAARectToRect(rt, clip, paint, viewMatrix, rect, rect, &loca
lMatrix); | |
| 144 } | |
| 145 | 140 |
| 146 /** | 141 /** |
| 147 * Draw a roundrect using a paint. | 142 * Draw a roundrect using a paint. |
| 148 * | 143 * |
| 149 * @param paint describes how to color pixels. | 144 * @param paint describes how to color pixels. |
| 150 * @param viewMatrix transformation matrix | 145 * @param viewMatrix transformation matrix |
| 151 * @param rrect the roundrect to draw | 146 * @param rrect the roundrect to draw |
| 152 * @param strokeInfo the stroke information (width, join, cap) and | 147 * @param strokeInfo the stroke information (width, join, cap) and |
| 153 * the dash information (intervals, count, phase). | 148 * the dash information (intervals, count, phase). |
| 154 */ | 149 */ |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); | 286 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); |
| 292 | 287 |
| 293 GrContext* fContext; // owning context -> no ref | 288 GrContext* fContext; // owning context -> no ref |
| 294 GrDrawTarget* fDrawTarget; | 289 GrDrawTarget* fDrawTarget; |
| 295 GrTextContext* fTextContext; // lazily created | 290 GrTextContext* fTextContext; // lazily created |
| 296 | 291 |
| 297 SkSurfaceProps fSurfaceProps; | 292 SkSurfaceProps fSurfaceProps; |
| 298 }; | 293 }; |
| 299 | 294 |
| 300 #endif | 295 #endif |
| OLD | NEW |