| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 /** | 120 /** |
| 121 * Implements GrTextureProvider::wrapBackendTexture | 121 * Implements GrTextureProvider::wrapBackendTexture |
| 122 */ | 122 */ |
| 123 GrTexture* wrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership); | 123 GrTexture* wrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership); |
| 124 | 124 |
| 125 /** | 125 /** |
| 126 * Implements GrTextureProvider::wrapBackendRenderTarget | 126 * Implements GrTextureProvider::wrapBackendRenderTarget |
| 127 */ | 127 */ |
| 128 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr
WrapOwnership); | 128 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr
WrapOwnership); |
| 129 | 129 |
| 130 void computeBackendTextureKeyForWrapAsRenderTarget(const GrBackendTextureDes
c&, |
| 131 GrUniqueKey*); |
| 132 bool rewrapRenderTargetWithBackendTexture(const GrBackendTextureDesc&, |
| 133 GrRenderTarget*); |
| 130 /** | 134 /** |
| 131 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget | 135 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget |
| 132 */ | 136 */ |
| 133 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc&
); | 137 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc&
); |
| 134 | 138 |
| 135 /** | 139 /** |
| 136 * Creates a buffer. | 140 * Creates a buffer. |
| 137 * | 141 * |
| 138 * @return the buffer if successful, otherwise nullptr. | 142 * @return the buffer if successful, otherwise nullptr. |
| 139 */ | 143 */ |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, | 529 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, |
| 526 SkBudgeted budgeted, | 530 SkBudgeted budgeted, |
| 527 const SkTArray<GrMipLevel>& texels) = 0; | 531 const SkTArray<GrMipLevel>& texels) = 0; |
| 528 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, | 532 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, |
| 529 SkBudgeted budgeted, | 533 SkBudgeted budgeted, |
| 530 const SkTArray<GrMipLevel>& tex
els) = 0; | 534 const SkTArray<GrMipLevel>& tex
els) = 0; |
| 531 | 535 |
| 532 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; | 536 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; |
| 533 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, | 537 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, |
| 534 GrWrapOwnership) = 0; | 538 GrWrapOwnership) = 0; |
| 539 |
| 540 virtual void onComputeBackendTextureKeyForWrapAsRenderTarget(const GrBackend
TextureDesc&, |
| 541 GrUniqueKey*) =
0; |
| 542 virtual bool onRewrapRenderTargetWithBackendTexture(const GrBackendTextureDe
sc&, |
| 543 GrRenderTarget*) = 0; |
| 535 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&) = 0; | 544 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&) = 0; |
| 536 virtual GrBuffer* onCreateBuffer(GrBufferType, size_t size, GrAccessPattern)
= 0; | 545 virtual GrBuffer* onCreateBuffer(GrBufferType, size_t size, GrAccessPattern)
= 0; |
| 537 | 546 |
| 538 // overridden by backend-specific derived class to perform the clear. | 547 // overridden by backend-specific derived class to perform the clear. |
| 539 virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) =
0; | 548 virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) =
0; |
| 540 | 549 |
| 541 // Overridden by backend specific classes to perform a clear of the stencil
clip bits. This is | 550 // Overridden by backend specific classes to perform a clear of the stencil
clip bits. This is |
| 542 // ONLY used by the the clip target | 551 // ONLY used by the the clip target |
| 543 virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
nsideClip) = 0; | 552 virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
nsideClip) = 0; |
| 544 | 553 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 613 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
| 605 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 614 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
| 606 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 615 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
| 607 GrContext* fContext
; | 616 GrContext* fContext
; |
| 608 | 617 |
| 609 friend class GrPathRendering; | 618 friend class GrPathRendering; |
| 610 typedef SkRefCnt INHERITED; | 619 typedef SkRefCnt INHERITED; |
| 611 }; | 620 }; |
| 612 | 621 |
| 613 #endif | 622 #endif |
| OLD | NEW |