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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr
WrapOwnership); | 128 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr
WrapOwnership); |
129 | 129 |
130 /** | 130 /** |
131 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget | 131 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget |
132 */ | 132 */ |
133 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc&
); | 133 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc&
); |
134 | 134 |
135 /** | 135 /** |
136 * Creates a buffer. | 136 * Creates a buffer. |
137 * | 137 * |
138 * @param size size of buffer to create. | |
139 * @param intendedType hint to the graphics subsystem about what the buff
er will be used for. | |
140 * @param accessPattern hint to the graphics subsystem about how the data
will be accessed. | |
141 * | |
142 * @return the buffer if successful, otherwise nullptr. | 138 * @return the buffer if successful, otherwise nullptr. |
143 */ | 139 */ |
144 GrBuffer* createBuffer(size_t size, GrBufferType intendedType, GrAccessPatte
rn accessPattern); | 140 GrBuffer* createBuffer(GrBufferType, size_t size, GrAccessPattern); |
145 | 141 |
146 /** | 142 /** |
147 * Resolves MSAA. | 143 * Resolves MSAA. |
148 */ | 144 */ |
149 void resolveRenderTarget(GrRenderTarget* target); | 145 void resolveRenderTarget(GrRenderTarget* target); |
150 | 146 |
151 /** Info struct returned by getReadPixelsInfo about performing intermediate
draws before | 147 /** Info struct returned by getReadPixelsInfo about performing intermediate
draws before |
152 reading pixels for performance or correctness. */ | 148 reading pixels for performance or correctness. */ |
153 struct ReadPixelTempDrawInfo { | 149 struct ReadPixelTempDrawInfo { |
154 /** If the GrGpu is requesting that the caller do a draw to an intermedi
ate surface then | 150 /** If the GrGpu is requesting that the caller do a draw to an intermedi
ate surface then |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 GrGpuResource::LifeCycle lifeCycle, | 526 GrGpuResource::LifeCycle lifeCycle, |
531 const SkTArray<GrMipLevel>& texels) = 0; | 527 const SkTArray<GrMipLevel>& texels) = 0; |
532 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, | 528 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, |
533 GrGpuResource::LifeCycle lifeCy
cle, | 529 GrGpuResource::LifeCycle lifeCy
cle, |
534 const SkTArray<GrMipLevel>& tex
els) = 0; | 530 const SkTArray<GrMipLevel>& tex
els) = 0; |
535 | 531 |
536 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; | 532 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
wnership) = 0; |
537 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, | 533 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&, |
538 GrWrapOwnership) = 0; | 534 GrWrapOwnership) = 0; |
539 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&) = 0; | 535 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe
xtureDesc&) = 0; |
540 virtual GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrA
ccessPattern) = 0; | 536 virtual GrBuffer* onCreateBuffer(GrBufferType, size_t size, GrAccessPattern)
= 0; |
541 | 537 |
542 // overridden by backend-specific derived class to perform the clear. | 538 // overridden by backend-specific derived class to perform the clear. |
543 virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) =
0; | 539 virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) =
0; |
544 | 540 |
545 // Overridden by backend specific classes to perform a clear of the stencil
clip bits. This is | 541 // Overridden by backend specific classes to perform a clear of the stencil
clip bits. This is |
546 // ONLY used by the the clip target | 542 // ONLY used by the the clip target |
547 virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
nsideClip) = 0; | 543 virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
nsideClip) = 0; |
548 | 544 |
549 // overridden by backend-specific derived class to perform the draw call. | 545 // overridden by backend-specific derived class to perform the draw call. |
550 virtual void onDraw(const GrPipeline&, | 546 virtual void onDraw(const GrPipeline&, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 604 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
609 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 605 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
610 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 606 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
611 GrContext* fContext
; | 607 GrContext* fContext
; |
612 | 608 |
613 friend class GrPathRendering; | 609 friend class GrPathRendering; |
614 typedef SkRefCnt INHERITED; | 610 typedef SkRefCnt INHERITED; |
615 }; | 611 }; |
616 | 612 |
617 #endif | 613 #endif |
OLD | NEW |