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