OLD | NEW |
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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 // not be created. | 462 // not be created. |
463 virtual bool createStencilBufferForRenderTarget(GrRenderTarget*, int width,
int height) = 0; | 463 virtual bool createStencilBufferForRenderTarget(GrRenderTarget*, int width,
int height) = 0; |
464 | 464 |
465 // attaches an existing SB to an existing RT. | 465 // attaches an existing SB to an existing RT. |
466 virtual bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTar
get*) = 0; | 466 virtual bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTar
get*) = 0; |
467 | 467 |
468 // The GrGpu typically records the clients requested state and then flushes | 468 // The GrGpu typically records the clients requested state and then flushes |
469 // deltas from previous state at draw time. This function does the | 469 // deltas from previous state at draw time. This function does the |
470 // backend-specific flush of the state. | 470 // backend-specific flush of the state. |
471 // returns false if current state is unsupported. | 471 // returns false if current state is unsupported. |
472 virtual bool flushGraphicsState(const GrOptDrawState&) = 0; | 472 virtual bool flushGraphicsState(const GrOptDrawState&, DrawType) = 0; |
473 | 473 |
474 // clears target's entire stencil buffer to 0 | 474 // clears target's entire stencil buffer to 0 |
475 virtual void clearStencil(GrRenderTarget* target) = 0; | 475 virtual void clearStencil(GrRenderTarget* target) = 0; |
476 | 476 |
477 // Given a rt, find or create a stencil buffer and attach it | 477 // Given a rt, find or create a stencil buffer and attach it |
478 bool attachStencilBufferToRenderTarget(GrRenderTarget* target); | 478 bool attachStencilBufferToRenderTarget(GrRenderTarget* target); |
479 | 479 |
480 virtual void didAddGpuTraceMarker() = 0; | 480 virtual void didAddGpuTraceMarker() = 0; |
481 virtual void didRemoveGpuTraceMarker() = 0; | 481 virtual void didRemoveGpuTraceMarker() = 0; |
482 | 482 |
(...skipping 17 matching lines...) Expand all Loading... |
500 int fGpuTrac
eMarkerCount; | 500 int fGpuTrac
eMarkerCount; |
501 GrTraceMarkerSet fActiveT
raceMarkers; | 501 GrTraceMarkerSet fActiveT
raceMarkers; |
502 GrTraceMarkerSet fStoredT
raceMarkers; | 502 GrTraceMarkerSet fStoredT
raceMarkers; |
503 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 503 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
504 GrContext* fContext
; | 504 GrContext* fContext
; |
505 | 505 |
506 typedef SkRefCnt INHERITED; | 506 typedef SkRefCnt INHERITED; |
507 }; | 507 }; |
508 | 508 |
509 #endif | 509 #endif |
OLD | NEW |