Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: src/gpu/GrDrawTarget.h

Issue 1337513002: Late creation of GrPathProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const GrCaps* caps() const { return fCaps; } 69 const GrCaps* caps() const { return fCaps; }
70 70
71 void drawBatch(const GrPipelineBuilder&, GrDrawBatch*); 71 void drawBatch(const GrPipelineBuilder&, GrDrawBatch*);
72 72
73 /** 73 /**
74 * Draws path into the stencil buffer. The fill must be either even/odd or 74 * Draws path into the stencil buffer. The fill must be either even/odd or
75 * winding (not inverse or hairline). It will respect the HW antialias flag 75 * winding (not inverse or hairline). It will respect the HW antialias flag
76 * on the GrPipelineBuilder (if possible in the 3D API). Note, we will neve r have an inverse 76 * on the GrPipelineBuilder (if possible in the 3D API). Note, we will neve r have an inverse
77 * fill with stencil path 77 * fill with stencil path
78 */ 78 */
79 void stencilPath(const GrPipelineBuilder&, const GrPathProcessor*, const GrP ath*, 79 void stencilPath(const GrPipelineBuilder&, const SkMatrix& viewMatrix, const GrPath*,
80 GrPathRendering::FillType); 80 GrPathRendering::FillType);
81 81
82 /** 82 /**
83 * Draws a path. Fill must not be a hairline. It will respect the HW 83 * Draws a path. Fill must not be a hairline. It will respect the HW
84 * antialias flag on the GrPipelineBuilder (if possible in the 3D API). 84 * antialias flag on the GrPipelineBuilder (if possible in the 3D API).
85 * 85 *
86 * TODO: Remove this function and construct the batch outside GrDrawTarget. 86 * TODO: Remove this function and construct the batch outside GrDrawTarget.
87 */ 87 */
88 void drawPath(const GrPipelineBuilder&, const GrPathProcessor*, const GrPath *, 88 void drawPath(const GrPipelineBuilder&, const SkMatrix& viewMatrix, GrColor color,
89 GrPathRendering::FillType); 89 const GrPath*, GrPathRendering::FillType);
90 90
91 /** 91 /**
92 * Draws the aggregate path from combining multiple. Note that this will not 92 * Draws the aggregate path from combining multiple. Note that this will not
93 * always be equivalent to back-to-back calls to drawPath(). It will respect 93 * always be equivalent to back-to-back calls to drawPath(). It will respect
94 * the HW antialias flag on the GrPipelineBuilder (if possible in the 3D API ). 94 * the HW antialias flag on the GrPipelineBuilder (if possible in the 3D API ).
95 * 95 *
96 * TODO: Remove this function and construct the batch outside GrDrawTarget. 96 * TODO: Remove this function and construct the batch outside GrDrawTarget.
97 * 97 *
98 * @param draw The range, transforms, and indices for the draw. 98 * @param draw The range, transforms, and indices for the draw.
99 * This object must only be drawn once. The draw 99 * This object must only be drawn once. The draw
100 * may modify its contents. 100 * may modify its contents.
101 * @param fill Fill type for drawing all the paths 101 * @param fill Fill type for drawing all the paths
102 */ 102 */
103 void drawPathsFromRange(const GrPipelineBuilder&, 103 void drawPathsFromRange(const GrPipelineBuilder&,
104 const GrPathProcessor*, 104 const SkMatrix& viewMatrix,
105 const SkMatrix& localMatrix,
106 GrColor color,
105 GrPathRangeDraw* draw, 107 GrPathRangeDraw* draw,
106 GrPathRendering::FillType fill); 108 GrPathRendering::FillType fill);
107 109
108 /** 110 /**
109 * Helper function for drawing rects. 111 * Helper function for drawing rects.
110 * 112 *
111 * @param rect the rect to draw 113 * @param rect the rect to draw
112 * @param localRect optional rect that specifies local coords to map onto 114 * @param localRect optional rect that specifies local coords to map onto
113 * rect. If nullptr then rect serves as the local coords. 115 * rect. If nullptr then rect serves as the local coords.
114 * @param localMatrix Optional local matrix. The local coordinates are speci fied by localRect, 116 * @param localMatrix Optional local matrix. The local coordinates are speci fied by localRect,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 bool setupClip(const GrPipelineBuilder&, 278 bool setupClip(const GrPipelineBuilder&,
277 GrPipelineBuilder::AutoRestoreFragmentProcessorState*, 279 GrPipelineBuilder::AutoRestoreFragmentProcessorState*,
278 GrPipelineBuilder::AutoRestoreStencil*, 280 GrPipelineBuilder::AutoRestoreStencil*,
279 GrScissorState* scissorState, 281 GrScissorState* scissorState,
280 const SkRect* devBounds) override; 282 const SkRect* devBounds) override;
281 283
282 typedef GrDrawTarget INHERITED; 284 typedef GrDrawTarget INHERITED;
283 }; 285 };
284 286
285 #endif 287 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698