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

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

Issue 1304403003: Merge 1304263003 to m45 (Closed) Base URL: https://skia.googlesource.com/skia.git@m45
Patch Set: 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 | « no previous file | src/gpu/GrGpu.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 GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 virtual void buildProgramDesc(GrProgramDesc*, 265 virtual void buildProgramDesc(GrProgramDesc*,
266 const GrPrimitiveProcessor&, 266 const GrPrimitiveProcessor&,
267 const GrPipeline&, 267 const GrPipeline&,
268 const GrBatchTracker&) const = 0; 268 const GrBatchTracker&) const = 0;
269 269
270 // Called to perform a surface to surface copy. Fallbacks to issuing a draw from the src to dst 270 // Called to perform a surface to surface copy. Fallbacks to issuing a draw from the src to dst
271 // take place at the GrDrawTarget level and this function implement faster c opy paths. The rect 271 // take place at the GrDrawTarget level and this function implement faster c opy paths. The rect
272 // and point are pre-clipped. The src rect and implied dst rect are guarante ed to be within the 272 // and point are pre-clipped. The src rect and implied dst rect are guarante ed to be within the
273 // src/dst bounds and non-empty. 273 // src/dst bounds and non-empty.
274 virtual bool copySurface(GrSurface* dst, 274 bool copySurface(GrSurface* dst,
275 GrSurface* src, 275 GrSurface* src,
276 const SkIRect& srcRect, 276 const SkIRect& srcRect,
277 const SkIPoint& dstPoint) = 0; 277 const SkIPoint& dstPoint);
278 278
279 // Called before certain draws in order to guarantee coherent results from d st reads. 279 // Called before certain draws in order to guarantee coherent results from d st reads.
280 virtual void xferBarrier(GrRenderTarget*, GrXferBarrierType) = 0; 280 virtual void xferBarrier(GrRenderTarget*, GrXferBarrierType) = 0;
281 281
282 struct DrawArgs { 282 struct DrawArgs {
283 DrawArgs(const GrPrimitiveProcessor* primProc, 283 DrawArgs(const GrPrimitiveProcessor* primProc,
284 const GrPipeline* pipeline, 284 const GrPipeline* pipeline,
285 const GrProgramDesc* desc, 285 const GrProgramDesc* desc,
286 const GrBatchTracker* batchTracker) 286 const GrBatchTracker* batchTracker)
287 : fPrimitiveProcessor(primProc) 287 : fPrimitiveProcessor(primProc)
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 // overridden by backend-specific derived class to perform the texture updat e 428 // overridden by backend-specific derived class to perform the texture updat e
429 virtual bool onWriteTexturePixels(GrTexture* texture, 429 virtual bool onWriteTexturePixels(GrTexture* texture,
430 int left, int top, int width, int height, 430 int left, int top, int width, int height,
431 GrPixelConfig config, const void* buffer, 431 GrPixelConfig config, const void* buffer,
432 size_t rowBytes) = 0; 432 size_t rowBytes) = 0;
433 433
434 // overridden by backend-specific derived class to perform the resolve 434 // overridden by backend-specific derived class to perform the resolve
435 virtual void onResolveRenderTarget(GrRenderTarget* target) = 0; 435 virtual void onResolveRenderTarget(GrRenderTarget* target) = 0;
436 436
437 // overridden by backend specific derived class to perform the copy surface
438 virtual bool onCopySurface(GrSurface* dst,
439 GrSurface* src,
440 const SkIRect& srcRect,
441 const SkIPoint& dstPoint) = 0;
442
437 // width and height may be larger than rt (if underlying API allows it). 443 // width and height may be larger than rt (if underlying API allows it).
438 // Should attach the SB to the RT. Returns false if compatible sb could 444 // Should attach the SB to the RT. Returns false if compatible sb could
439 // not be created. 445 // not be created.
440 virtual bool createStencilAttachmentForRenderTarget(GrRenderTarget*, int wid th, int height) = 0; 446 virtual bool createStencilAttachmentForRenderTarget(GrRenderTarget*, int wid th, int height) = 0;
441 447
442 // attaches an existing SB to an existing RT. 448 // attaches an existing SB to an existing RT.
443 virtual bool attachStencilAttachmentToRenderTarget(GrStencilAttachment*, GrR enderTarget*) = 0; 449 virtual bool attachStencilAttachmentToRenderTarget(GrStencilAttachment*, GrR enderTarget*) = 0;
444 450
445 // clears target's entire stencil buffer to 0 451 // clears target's entire stencil buffer to 0
446 virtual void clearStencil(GrRenderTarget* target) = 0; 452 virtual void clearStencil(GrRenderTarget* target) = 0;
(...skipping 20 matching lines...) Expand all
467 GrTraceMarkerSet fActiveT raceMarkers; 473 GrTraceMarkerSet fActiveT raceMarkers;
468 GrTraceMarkerSet fStoredT raceMarkers; 474 GrTraceMarkerSet fStoredT raceMarkers;
469 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 475 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
470 GrContext* fContext ; 476 GrContext* fContext ;
471 477
472 friend class GrPathRendering; 478 friend class GrPathRendering;
473 typedef SkRefCnt INHERITED; 479 typedef SkRefCnt INHERITED;
474 }; 480 };
475 481
476 #endif 482 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698