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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 int left, int top, int width, int height, | 471 int left, int top, int width, int height, |
472 GrPixelConfig config, const void* buffer, | 472 GrPixelConfig config, const void* buffer, |
473 size_t rowBytes) = 0; | 473 size_t rowBytes) = 0; |
474 | 474 |
475 // overridden by backend-specific derived class to perform the resolve | 475 // overridden by backend-specific derived class to perform the resolve |
476 virtual void onResolveRenderTarget(GrRenderTarget* target) = 0; | 476 virtual void onResolveRenderTarget(GrRenderTarget* target) = 0; |
477 | 477 |
478 // width and height may be larger than rt (if underlying API allows it). | 478 // width and height may be larger than rt (if underlying API allows it). |
479 // Should attach the SB to the RT. Returns false if compatible sb could | 479 // Should attach the SB to the RT. Returns false if compatible sb could |
480 // not be created. | 480 // not be created. |
481 virtual bool createStencilBufferForRenderTarget(GrRenderTarget*, int width, int height) = 0; | 481 virtual bool createStencilBufferForRenderTarget(GrRenderTarget*, bool budget ed, |
reed1
2015/01/20 13:54:36
Why not keep the enum that was created for this, r
Kimmo Kinnunen
2015/01/20 14:05:48
So it's consistent with the call that does the sam
bsalomon
2015/01/21 14:18:18
I'm slightly hesitant to start depending on an enu
| |
482 int width, int height) = 0; | |
482 | 483 |
483 // attaches an existing SB to an existing RT. | 484 // attaches an existing SB to an existing RT. |
484 virtual bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTar get*) = 0; | 485 virtual bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTar get*) = 0; |
485 | 486 |
486 // clears target's entire stencil buffer to 0 | 487 // clears target's entire stencil buffer to 0 |
487 virtual void clearStencil(GrRenderTarget* target) = 0; | 488 virtual void clearStencil(GrRenderTarget* target) = 0; |
488 | 489 |
489 // Given a rt, find or create a stencil buffer and attach it | 490 // Given a rt, find or create a stencil buffer and attach it |
490 bool attachStencilBufferToRenderTarget(GrRenderTarget* target); | 491 bool attachStencilBufferToRenderTarget(GrRenderTarget* target, bool budgeted ); |
491 | 492 |
492 virtual void didAddGpuTraceMarker() = 0; | 493 virtual void didAddGpuTraceMarker() = 0; |
493 virtual void didRemoveGpuTraceMarker() = 0; | 494 virtual void didRemoveGpuTraceMarker() = 0; |
494 | 495 |
495 void resetContext() { | 496 void resetContext() { |
496 this->onResetContext(fResetBits); | 497 this->onResetContext(fResetBits); |
497 fResetBits = 0; | 498 fResetBits = 0; |
498 ++fResetTimestamp; | 499 ++fResetTimestamp; |
499 } | 500 } |
500 | 501 |
(...skipping 11 matching lines...) Expand all Loading... | |
512 int fGpuTrac eMarkerCount; | 513 int fGpuTrac eMarkerCount; |
513 GrTraceMarkerSet fActiveT raceMarkers; | 514 GrTraceMarkerSet fActiveT raceMarkers; |
514 GrTraceMarkerSet fStoredT raceMarkers; | 515 GrTraceMarkerSet fStoredT raceMarkers; |
515 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 516 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
516 GrContext* fContext ; | 517 GrContext* fContext ; |
517 | 518 |
518 typedef SkRefCnt INHERITED; | 519 typedef SkRefCnt INHERITED; |
519 }; | 520 }; |
520 | 521 |
521 #endif | 522 #endif |
OLD | NEW |