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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 GrTexture* wrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership); | 117 GrTexture* wrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership); |
118 | 118 |
119 /** | 119 /** |
120 * Implements GrTextureProvider::wrapBackendRenderTarget | 120 * Implements GrTextureProvider::wrapBackendRenderTarget |
121 */ | 121 */ |
122 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr
WrapOwnership); | 122 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr
WrapOwnership); |
123 | 123 |
124 /** | 124 /** |
125 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget | 125 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget |
126 */ | 126 */ |
127 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc&
, GrWrapOwnership); | 127 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc&
); |
128 | 128 |
129 /** | 129 /** |
130 * Creates a buffer. | 130 * Creates a buffer. |
131 * | 131 * |
132 * @return the buffer if successful, otherwise nullptr. | 132 * @return the buffer if successful, otherwise nullptr. |
133 */ | 133 */ |
134 GrBuffer* createBuffer(GrBufferType, size_t size, GrAccessPattern); | 134 GrBuffer* createBuffer(GrBufferType, size_t size, GrAccessPattern); |
135 | 135 |
136 /** | 136 /** |
137 * Resolves MSAA. | 137 * Resolves MSAA. |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, | 519 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, |
520 GrGpuResource::LifeCycle lifeCycle, | 520 GrGpuResource::LifeCycle lifeCycle, |
521 const SkTArray<GrMipLevel>& texels) = 0; | 521 const SkTArray<GrMipLevel>& texels) = 0; |
522 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, | 522 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, |
523 GrGpuResource::LifeCycle lifeCy
cle, | 523 GrGpuResource::LifeCycle lifeCy
cle, |
524 const SkTArray<GrMipLevel>& tex
els) = 0; | 524 const SkTArray<GrMipLevel>& tex
els) = 0; |
525 | 525 |
526 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; | 526 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; |
527 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, | 527 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, |
528 GrWrapOwnership) = 0; | 528 GrWrapOwnership) = 0; |
529 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&, | 529 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&) = 0; |
530 GrWrapOwnership)
= 0; | |
531 virtual GrBuffer* onCreateBuffer(GrBufferType, size_t size, GrAccessPattern)
= 0; | 530 virtual GrBuffer* onCreateBuffer(GrBufferType, size_t size, GrAccessPattern)
= 0; |
532 | 531 |
533 // overridden by backend-specific derived class to perform the clear. | 532 // overridden by backend-specific derived class to perform the clear. |
534 virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) =
0; | 533 virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) =
0; |
535 | 534 |
536 // Overridden by backend specific classes to perform a clear of the stencil
clip bits. This is | 535 // Overridden by backend specific classes to perform a clear of the stencil
clip bits. This is |
537 // ONLY used by the the clip target | 536 // ONLY used by the the clip target |
538 virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
nsideClip) = 0; | 537 virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
nsideClip) = 0; |
539 | 538 |
540 // overridden by backend-specific derived class to perform the draw call. | 539 // overridden by backend-specific derived class to perform the draw call. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 598 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
600 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 599 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
601 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 600 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
602 GrContext* fContext
; | 601 GrContext* fContext
; |
603 | 602 |
604 friend class GrPathRendering; | 603 friend class GrPathRendering; |
605 typedef SkRefCnt INHERITED; | 604 typedef SkRefCnt INHERITED; |
606 }; | 605 }; |
607 | 606 |
608 #endif | 607 #endif |
OLD | NEW |