| 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 |
| 11 #include "GrColor.h" | 11 #include "GrColor.h" |
| 12 #include "SkRefCnt.h" | 12 #include "SkRefCnt.h" |
| 13 #include "SkSurfaceProps.h" | 13 #include "SkSurfaceProps.h" |
| 14 | 14 |
| 15 class GrClip; | 15 class GrClip; |
| 16 class GrContext; | 16 class GrContext; |
| 17 class GrDrawBatch; | 17 class GrDrawBatch; |
| 18 class GrDrawTarget; | 18 class GrDrawTarget; |
| 19 class GrPaint; | 19 class GrPaint; |
| 20 class GrPathProcessor; | 20 class GrPathProcessor; |
| 21 class GrPathRange; | 21 class GrPathRangeDraw; |
| 22 class GrPipelineBuilder; | 22 class GrPipelineBuilder; |
| 23 class GrRenderTarget; | 23 class GrRenderTarget; |
| 24 class GrStrokeInfo; | 24 class GrStrokeInfo; |
| 25 class GrSurface; | 25 class GrSurface; |
| 26 class GrTextContext; | 26 class GrTextContext; |
| 27 class SkDrawFilter; | 27 class SkDrawFilter; |
| 28 struct SkIPoint; | 28 struct SkIPoint; |
| 29 struct SkIRect; | 29 struct SkIRect; |
| 30 class SkMatrix; | 30 class SkMatrix; |
| 31 class SkPaint; | 31 class SkPaint; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 SkScalar x, SkScalar y, const SkIRect& clipBounds); | 54 SkScalar x, SkScalar y, const SkIRect& clipBounds); |
| 55 void drawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPai
nt&, | 55 void drawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPai
nt&, |
| 56 const SkMatrix& viewMatrix, const char text[], size_t byteL
ength, | 56 const SkMatrix& viewMatrix, const char text[], size_t byteL
ength, |
| 57 const SkScalar pos[], int scalarsPerPosition, | 57 const SkScalar pos[], int scalarsPerPosition, |
| 58 const SkPoint& offset, const SkIRect& clipBounds); | 58 const SkPoint& offset, const SkIRect& clipBounds); |
| 59 void drawTextBlob(GrRenderTarget*, const GrClip&, const SkPaint&, | 59 void drawTextBlob(GrRenderTarget*, const GrClip&, const SkPaint&, |
| 60 const SkMatrix& viewMatrix, const SkTextBlob*, | 60 const SkMatrix& viewMatrix, const SkTextBlob*, |
| 61 SkScalar x, SkScalar y, | 61 SkScalar x, SkScalar y, |
| 62 SkDrawFilter*, const SkIRect& clipBounds); | 62 SkDrawFilter*, const SkIRect& clipBounds); |
| 63 | 63 |
| 64 // drawPaths is thanks to GrStencilAndCoverTextContext | 64 // drawPathsFromRange is thanks to GrStencilAndCoverTextContext |
| 65 // TODO: remove | 65 // TODO: remove once path batches can be created external to GrDrawTarget. |
| 66 void drawPaths(GrPipelineBuilder* pipelineBuilder, | 66 void drawPathsFromRange(const GrPipelineBuilder*, |
| 67 const GrPathProcessor* pathProc, | 67 const GrPathProcessor*, |
| 68 const GrPathRange* pathRange, | 68 GrPathRangeDraw* draw, |
| 69 const void* indices, | 69 int /*GrPathRendering::FillType*/ fill); |
| 70 int /*GrDrawTarget::PathIndexType*/ indexType, | |
| 71 const float transformValues[], | |
| 72 int /*GrDrawTarget::PathTransformType*/ transformType, | |
| 73 int count, | |
| 74 int /*GrPathRendering::FillType*/ fill); | |
| 75 | 70 |
| 76 /** | 71 /** |
| 77 * Provides a perfomance hint that the render target's contents are allowed | 72 * Provides a perfomance hint that the render target's contents are allowed |
| 78 * to become undefined. | 73 * to become undefined. |
| 79 */ | 74 */ |
| 80 void discard(GrRenderTarget*); | 75 void discard(GrRenderTarget*); |
| 81 | 76 |
| 82 /** | 77 /** |
| 83 * Clear the entire or rect of the render target, ignoring any clips. | 78 * Clear the entire or rect of the render target, ignoring any clips. |
| 84 * @param target The render target to clear. | 79 * @param target The render target to clear. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); | 281 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); |
| 287 | 282 |
| 288 GrContext* fContext; // owning context -> no ref | 283 GrContext* fContext; // owning context -> no ref |
| 289 GrDrawTarget* fDrawTarget; | 284 GrDrawTarget* fDrawTarget; |
| 290 GrTextContext* fTextContext; // lazily created | 285 GrTextContext* fTextContext; // lazily created |
| 291 | 286 |
| 292 SkSurfaceProps fSurfaceProps; | 287 SkSurfaceProps fSurfaceProps; |
| 293 }; | 288 }; |
| 294 | 289 |
| 295 #endif | 290 #endif |
| OLD | NEW |