| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 * @param viewMatrix transformation matrix | 183 * @param viewMatrix transformation matrix |
| 184 * @param path the path to draw | 184 * @param path the path to draw |
| 185 * @param strokeInfo the stroke information (width, join, cap) and | 185 * @param strokeInfo the stroke information (width, join, cap) and |
| 186 * the dash information (intervals, count, phase). | 186 * the dash information (intervals, count, phase). |
| 187 */ | 187 */ |
| 188 void drawPath(GrRenderTarget*, | 188 void drawPath(GrRenderTarget*, |
| 189 const GrClip&, | 189 const GrClip&, |
| 190 const GrPaint&, | 190 const GrPaint&, |
| 191 const SkMatrix& viewMatrix, | 191 const SkMatrix& viewMatrix, |
| 192 const SkPath&, | 192 const SkPath&, |
| 193 const GrStrokeInfo&); | 193 const GrStrokeInfo&, |
| 194 const SkPath* origSrcPath = nullptr, |
| 195 const GrStrokeInfo* origStrokeInfo = nullptr); |
| 194 | 196 |
| 195 /** | 197 /** |
| 196 * Draws vertices with a paint. | 198 * Draws vertices with a paint. |
| 197 * | 199 * |
| 198 * @param paint describes how to color pixels. | 200 * @param paint describes how to color pixels. |
| 199 * @param viewMatrix transformation matrix | 201 * @param viewMatrix transformation matrix |
| 200 * @param primitiveType primitives type to draw. | 202 * @param primitiveType primitives type to draw. |
| 201 * @param vertexCount number of vertices. | 203 * @param vertexCount number of vertices. |
| 202 * @param positions array of vertex positions, required. | 204 * @param positions array of vertex positions, required. |
| 203 * @param texCoords optional array of texture coordinates used | 205 * @param texCoords optional array of texture coordinates used |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 250 |
| 249 // Checks if the context has been abandoned and if the rendertarget is owned
by this context | 251 // Checks if the context has been abandoned and if the rendertarget is owned
by this context |
| 250 bool prepareToDraw(GrRenderTarget* rt); | 252 bool prepareToDraw(GrRenderTarget* rt); |
| 251 | 253 |
| 252 void internalDrawPath(GrDrawTarget*, | 254 void internalDrawPath(GrDrawTarget*, |
| 253 GrPipelineBuilder*, | 255 GrPipelineBuilder*, |
| 254 const SkMatrix& viewMatrix, | 256 const SkMatrix& viewMatrix, |
| 255 GrColor, | 257 GrColor, |
| 256 bool useAA, | 258 bool useAA, |
| 257 const SkPath&, | 259 const SkPath&, |
| 258 const GrStrokeInfo&); | 260 const GrStrokeInfo&, |
| 261 const SkPath* origSrcPath = nullptr, |
| 262 const GrStrokeInfo* origStrokeInfo = nullptr); |
| 259 | 263 |
| 260 // This entry point allows the GrTextContext-derived classes to add their ba
tches to | 264 // This entry point allows the GrTextContext-derived classes to add their ba
tches to |
| 261 // the drawTarget. | 265 // the drawTarget. |
| 262 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); | 266 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); |
| 263 | 267 |
| 264 GrContext* fContext; // owning context -> no ref | 268 GrContext* fContext; // owning context -> no ref |
| 265 GrDrawTarget* fDrawTarget; | 269 GrDrawTarget* fDrawTarget; |
| 266 GrTextContext* fTextContext; // lazily created | 270 GrTextContext* fTextContext; // lazily created |
| 267 | 271 |
| 268 SkSurfaceProps fSurfaceProps; | 272 SkSurfaceProps fSurfaceProps; |
| 269 }; | 273 }; |
| 270 | 274 |
| 271 #endif | 275 #endif |
| OLD | NEW |