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

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

Issue 901663007: Revert of Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.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 2011 Google Inc. 2 * Copyright 2011 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 GrInOrderDrawBuffer_DEFINED 8 #ifndef GrInOrderDrawBuffer_DEFINED
9 #define GrInOrderDrawBuffer_DEFINED 9 #define GrInOrderDrawBuffer_DEFINED
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double. 226 typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
227 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; 227 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer;
228 228
229 void onReset() SK_OVERRIDE; 229 void onReset() SK_OVERRIDE;
230 void onFlush() SK_OVERRIDE; 230 void onFlush() SK_OVERRIDE;
231 231
232 // overrides from GrDrawTarget 232 // overrides from GrDrawTarget
233 void onDraw(const GrPipelineBuilder&, 233 void onDraw(const GrPipelineBuilder&,
234 const GrGeometryProcessor*, 234 const GrGeometryProcessor*,
235 const DrawInfo&, 235 const DrawInfo&,
236 const GrScissorState&) SK_OVERRIDE; 236 const GrScissorState&,
237 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
237 void onDrawBatch(GrBatch*, 238 void onDrawBatch(GrBatch*,
238 const GrPipelineBuilder&, 239 const GrPipelineBuilder&,
239 const GrScissorState&, 240 const GrScissorState&,
240 const SkRect* devBounds) SK_OVERRIDE; 241 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
241 void onDrawRect(GrPipelineBuilder*, 242 void onDrawRect(GrPipelineBuilder*,
242 GrColor, 243 GrColor,
243 const SkMatrix& viewMatrix, 244 const SkMatrix& viewMatrix,
244 const SkRect& rect, 245 const SkRect& rect,
245 const SkRect* localRect, 246 const SkRect* localRect,
246 const SkMatrix* localMatrix) SK_OVERRIDE; 247 const SkMatrix* localMatrix) SK_OVERRIDE;
247 248
248 void onStencilPath(const GrPipelineBuilder&, 249 void onStencilPath(const GrPipelineBuilder&,
249 const GrPathProcessor*, 250 const GrPathProcessor*,
250 const GrPath*, 251 const GrPath*,
251 const GrScissorState&, 252 const GrScissorState&,
252 const GrStencilSettings&) SK_OVERRIDE; 253 const GrStencilSettings&) SK_OVERRIDE;
253 void onDrawPath(const GrPipelineBuilder&, 254 void onDrawPath(const GrPipelineBuilder&,
254 const GrPathProcessor*, 255 const GrPathProcessor*,
255 const GrPath*, 256 const GrPath*,
256 const GrScissorState&, 257 const GrScissorState&,
257 const GrStencilSettings&, 258 const GrStencilSettings&,
258 const SkRect* devBounds) SK_OVERRIDE; 259 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
259 void onDrawPaths(const GrPipelineBuilder&, 260 void onDrawPaths(const GrPipelineBuilder&,
260 const GrPathProcessor*, 261 const GrPathProcessor*,
261 const GrPathRange*, 262 const GrPathRange*,
262 const void* indices, 263 const void* indices,
263 PathIndexType, 264 PathIndexType,
264 const float transformValues[], 265 const float transformValues[],
265 PathTransformType, 266 PathTransformType,
266 int count, 267 int count,
267 const GrScissorState&, 268 const GrScissorState&,
268 const GrStencilSettings&, 269 const GrStencilSettings&,
269 const SkRect* devBounds) SK_OVERRIDE; 270 const GrDeviceCoordTexture*) SK_OVERRIDE;
270 void onClear(const SkIRect* rect, 271 void onClear(const SkIRect* rect,
271 GrColor color, 272 GrColor color,
272 bool canIgnoreRect, 273 bool canIgnoreRect,
273 GrRenderTarget* renderTarget) SK_OVERRIDE; 274 GrRenderTarget* renderTarget) SK_OVERRIDE;
274 bool onCopySurface(GrSurface* dst, 275 bool onCopySurface(GrSurface* dst,
275 GrSurface* src, 276 GrSurface* src,
276 const SkIRect& srcRect, 277 const SkIRect& srcRect,
277 const SkIPoint& dstPoint) SK_OVERRIDE; 278 const SkIPoint& dstPoint) SK_OVERRIDE;
278 279
279 // Attempts to concat instances from info onto the previous draw. info must represent an 280 // Attempts to concat instances from info onto the previous draw. info must represent an
280 // instanced draw. The caller must have already recorded a new draw state an d clip if necessary. 281 // instanced draw. The caller must have already recorded a new draw state an d clip if necessary.
281 int concatInstancedDraw(const GrPipelineBuilder&, const DrawInfo&); 282 int concatInstancedDraw(const GrPipelineBuilder&, const DrawInfo&);
282 283
283 // Determines whether the current draw operation requires a new GrPipeline a nd if so 284 // Determines whether the current draw operation requires a new GrPipeline a nd if so
284 // records it. If the draw can be skipped false is returned and no new GrPip eline is 285 // records it. If the draw can be skipped false is returned and no new GrPip eline is
285 // recorded. 286 // recorded.
286 // TODO delete the primproc variant when we have batches everywhere 287 // TODO delete the primproc variant when we have batches everywhere
287 bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(const GrPipelineBuilder& , 288 bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(const GrPipelineBuilder& ,
288 const GrPrimitiveProcess or*, 289 const GrPrimitiveProcess or*,
289 const GrScissorState&, 290 const GrScissorState&,
290 const SkRect*); 291 const GrDeviceCoordTextu re*);
291 bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(GrBatch*, 292 bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(GrBatch*,
292 const GrPipelineBuilder& , 293 const GrPipelineBuilder& ,
293 const GrScissorState&, 294 const GrScissorState&,
294 const SkRect*); 295 const GrDeviceCoordTextu re*);
295 296
296 // We lazily record clip changes in order to skip clips that have no effect. 297 // We lazily record clip changes in order to skip clips that have no effect.
297 void recordClipIfNecessary(); 298 void recordClipIfNecessary();
298 // Records any trace markers for a command after adding it to the buffer. 299 // Records any trace markers for a command after adding it to the buffer.
299 void recordTraceMarkersIfNecessary(); 300 void recordTraceMarkersIfNecessary();
300 301
301 bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawID; } 302 bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawID; }
302 303
303 GrBatchTarget* getBatchTarget() { return &fBatchTarget; } 304 GrBatchTarget* getBatchTarget() { return &fBatchTarget; }
304 305
(...skipping 13 matching lines...) Expand all
318 GrBatchTarget fBatchTarget; 319 GrBatchTarget fBatchTarget;
319 // TODO hack until batch is everywhere 320 // TODO hack until batch is everywhere
320 DrawBatch* fDrawBatch; 321 DrawBatch* fDrawBatch;
321 322
322 void closeBatch(); 323 void closeBatch();
323 324
324 typedef GrFlushToGpuDrawTarget INHERITED; 325 typedef GrFlushToGpuDrawTarget INHERITED;
325 }; 326 };
326 327
327 #endif 328 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698