OLD | NEW |
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 GrRenderTargetOpList_DEFINED | 8 #ifndef GrRenderTargetOpList_DEFINED |
9 #define GrRenderTargetOpList_DEFINED | 9 #define GrRenderTargetOpList_DEFINED |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 * possible in the 3D API). Note, we will never have an inverse fill with | 96 * possible in the 3D API). Note, we will never have an inverse fill with |
97 * stencil path. | 97 * stencil path. |
98 */ | 98 */ |
99 void stencilPath(GrRenderTargetContext*, | 99 void stencilPath(GrRenderTargetContext*, |
100 const GrClip&, | 100 const GrClip&, |
101 bool useHWAA, | 101 bool useHWAA, |
102 const SkMatrix& viewMatrix, | 102 const SkMatrix& viewMatrix, |
103 const GrPath*); | 103 const GrPath*); |
104 | 104 |
105 /** Clears the entire render target */ | 105 /** Clears the entire render target */ |
106 void fullClear(GrRenderTarget*, GrColor color); | 106 void fullClear(GrRenderTargetProxy*, GrColor color); |
107 | 107 |
108 /** Discards the contents render target. */ | 108 /** Discards the contents render target. */ |
109 void discard(GrRenderTarget*); | 109 void discard(GrRenderTargetProxy*); |
110 | 110 |
111 /** | 111 /** |
112 * Copies a pixel rectangle from one surface to another. This call may final
ize | 112 * Copies a pixel rectangle from one surface to another. This call may final
ize |
113 * reserved vertex/index data (as though a draw call was made). The src pixe
ls | 113 * reserved vertex/index data (as though a draw call was made). The src pixe
ls |
114 * copied are specified by srcRect. They are copied to a rect of the same | 114 * copied are specified by srcRect. They are copied to a rect of the same |
115 * size in dst with top left at dstPoint. If the src rect is clipped by the | 115 * size in dst with top left at dstPoint. If the src rect is clipped by the |
116 * src bounds then pixel values in the dst rect corresponding to area clipp
ed | 116 * src bounds then pixel values in the dst rect corresponding to area clipp
ed |
117 * by the src rect are not overwritten. This method is not guaranteed to suc
ceed | 117 * by the src rect are not overwritten. This method is not guaranteed to suc
ceed |
118 * depending on the type of surface, configs, etc, and the backend-specific | 118 * depending on the type of surface, configs, etc, and the backend-specific |
119 * limitations. | 119 * limitations. |
(...skipping 15 matching lines...) Expand all Loading... |
135 | 135 |
136 // Returns the batch that the input batch was combined with or the input bat
ch if it wasn't | 136 // Returns the batch that the input batch was combined with or the input bat
ch if it wasn't |
137 // combined. | 137 // combined. |
138 GrBatch* recordBatch(GrBatch*, const SkRect& clippedBounds); | 138 GrBatch* recordBatch(GrBatch*, const SkRect& clippedBounds); |
139 void forwardCombine(); | 139 void forwardCombine(); |
140 | 140 |
141 // Makes a copy of the dst if it is necessary for the draw. Returns false if
a copy is required | 141 // Makes a copy of the dst if it is necessary for the draw. Returns false if
a copy is required |
142 // but couldn't be made. Otherwise, returns true. This method needs to be p
rotected because it | 142 // but couldn't be made. Otherwise, returns true. This method needs to be p
rotected because it |
143 // needs to be accessed by GLPrograms to setup a correct drawstate | 143 // needs to be accessed by GLPrograms to setup a correct drawstate |
144 bool setupDstReadIfNecessary(const GrPipelineBuilder&, | 144 bool setupDstReadIfNecessary(const GrPipelineBuilder&, |
145 GrRenderTarget*, | 145 GrRenderTargetContext*, |
146 const GrClip&, | 146 const GrClip&, |
147 const GrPipelineOptimizations& optimizations, | 147 const GrPipelineOptimizations& optimizations, |
148 GrXferProcessor::DstTexture*, | 148 GrXferProcessor::DstTexture*, |
149 const SkRect& batchBounds); | 149 const SkRect& batchBounds); |
150 | 150 |
151 // Used only via GrRenderTargetContextPriv. | 151 // Used only via GrRenderTargetContextPriv. |
152 void clearStencilClip(const GrFixedClip&, bool insideStencilMask, GrRenderTa
rget*); | 152 void clearStencilClip(const GrFixedClip&, bool insideStencilMask, GrRenderTa
rgetProxy*); |
| 153 |
| 154 void addDependency(GrOpList* dependedOn); |
153 | 155 |
154 struct RecordedBatch { | 156 struct RecordedBatch { |
155 sk_sp<GrBatch> fBatch; | 157 sk_sp<GrBatch> fBatch; |
156 SkRect fClippedBounds; | 158 SkRect fClippedBounds; |
157 }; | 159 }; |
158 SkSTArray<256, RecordedBatch, true> fRecordedBatches; | 160 SkSTArray<256, RecordedBatch, true> fRecordedBatches; |
159 GrClearBatch* fLastFullClearBatch; | 161 GrClearBatch* fLastFullClearBatch; |
160 // The context is only in service of the GrClip, remove once it doesn't need
this. | 162 // The context is only in service of the GrClip, remove once it doesn't need
this. |
161 GrContext* fContext; | 163 GrContext* fContext; |
162 GrGpu* fGpu; | 164 GrGpu* fGpu; |
163 GrResourceProvider* fResourceProvider; | 165 GrResourceProvider* fResourceProvider; |
164 | 166 |
165 bool fClipBatchToBounds; | 167 bool fClipBatchToBounds; |
166 bool fDrawBatchBounds; | 168 bool fDrawBatchBounds; |
167 int fMaxBatchLookback; | 169 int fMaxBatchLookback; |
168 int fMaxBatchLookahead; | 170 int fMaxBatchLookahead; |
169 | 171 |
170 std::unique_ptr<gr_instanced::InstancedRendering> fInstancedRendering; | 172 std::unique_ptr<gr_instanced::InstancedRendering> fInstancedRendering; |
171 | 173 |
172 int32_t fLastClipStackGenID; | 174 int32_t fLastClipStackGenID; |
173 SkIRect fLastClipStackRect; | 175 SkIRect fLastClipStackRect; |
174 SkIPoint fLastClipOrigin; | 176 SkIPoint fLastClipOrigin; |
175 | 177 |
176 typedef GrOpList INHERITED; | 178 typedef GrOpList INHERITED; |
177 }; | 179 }; |
178 | 180 |
179 #endif | 181 #endif |
OLD | NEW |