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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 // assumed 3D context state and dirty any state cache. | 522 // assumed 3D context state and dirty any state cache. |
523 virtual void onResetContext(uint32_t resetBits) = 0; | 523 virtual void onResetContext(uint32_t resetBits) = 0; |
524 | 524 |
525 // Called before certain draws in order to guarantee coherent results from d
st reads. | 525 // Called before certain draws in order to guarantee coherent results from d
st reads. |
526 virtual void xferBarrier(GrRenderTarget*, GrXferBarrierType) = 0; | 526 virtual void xferBarrier(GrRenderTarget*, GrXferBarrierType) = 0; |
527 | 527 |
528 // overridden by backend-specific derived class to create objects. | 528 // overridden by backend-specific derived class to create objects. |
529 // Texture size and sample size will have already been validated in base cla
ss before | 529 // Texture size and sample size will have already been validated in base cla
ss before |
530 // onCreateTexture/CompressedTexture are called. | 530 // onCreateTexture/CompressedTexture are called. |
531 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, | 531 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, |
532 GrGpuResource::LifeCycle lifeCycle, | 532 SkBudgeted budgeted, |
533 const SkTArray<GrMipLevel>& texels) = 0; | 533 const SkTArray<GrMipLevel>& texels) = 0; |
534 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, | 534 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, |
535 GrGpuResource::LifeCycle lifeCy
cle, | 535 SkBudgeted budgeted, |
536 const SkTArray<GrMipLevel>& tex
els) = 0; | 536 const SkTArray<GrMipLevel>& tex
els) = 0; |
537 | 537 |
538 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; | 538 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; |
539 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, | 539 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, |
540 GrWrapOwnership) = 0; | 540 GrWrapOwnership) = 0; |
541 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&) = 0; | 541 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&) = 0; |
542 virtual GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrA
ccessPattern, | 542 virtual GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrA
ccessPattern, |
543 const void* data) = 0; | 543 const void* data) = 0; |
544 | 544 |
545 // overridden by backend-specific derived class to perform the clear. | 545 // overridden by backend-specific derived class to perform the clear. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 611 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
612 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 612 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
613 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 613 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
614 GrContext* fContext
; | 614 GrContext* fContext
; |
615 | 615 |
616 friend class GrPathRendering; | 616 friend class GrPathRendering; |
617 typedef SkRefCnt INHERITED; | 617 typedef SkRefCnt INHERITED; |
618 }; | 618 }; |
619 | 619 |
620 #endif | 620 #endif |
OLD | NEW |