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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
10 | 10 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; | 152 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; |
153 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; | 153 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; |
154 GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) ove
rride; | 154 GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) ove
rride; |
155 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership
) override; | 155 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership
) override; |
156 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, | 156 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, |
157 GrWrapOwnership) override; | 157 GrWrapOwnership) override; |
158 // Given a GrPixelConfig return the index into the stencil format array on G
rGLCaps to a | 158 // Given a GrPixelConfig return the index into the stencil format array on G
rGLCaps to a |
159 // compatible stencil format, or negative if there is no compatible stencil
format. | 159 // compatible stencil format, or negative if there is no compatible stencil
format. |
160 int getCompatibleStencilIndex(GrPixelConfig config); | 160 int getCompatibleStencilIndex(GrPixelConfig config); |
161 | 161 |
| 162 // If |desc.fTextureStorageAllocator| exists, use that to create the |
| 163 // texture. Otherwise, create the texture directly. |
| 164 // Returns whether the texture is successfully created. On success, the |
| 165 // result is stored in |info|. |
| 166 // The texture is populated with |srcData|, if it exists. |
| 167 // The texture parameters are cached in |initialTexParams|. |
| 168 bool createTextureImpl(const GrSurfaceDesc& desc, GrGLTextureInfo* info, |
| 169 bool renderTarget, const void* srcData, |
| 170 GrGLTexture::TexParams* initialTexParams, size_t rowB
ytes); |
| 171 bool createTextureExternalAllocatorImpl(const GrSurfaceDesc& desc, GrGLTextu
reInfo* info, |
| 172 const void* srcData, size_t rowBytes
); |
| 173 |
162 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; | 174 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; |
163 | 175 |
164 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; | 176 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; |
165 | 177 |
166 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, | 178 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, |
167 GrTextureProducer::CopyParams*) const overri
de; | 179 GrTextureProducer::CopyParams*) const overri
de; |
168 | 180 |
169 // Checks whether glReadPixels can be called to get pixel values in readConf
ig from the | 181 // Checks whether glReadPixels can be called to get pixel values in readConf
ig from the |
170 // render target. | 182 // render target. |
171 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); | 183 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 } fPLSSetupProgram; | 597 } fPLSSetupProgram; |
586 | 598 |
587 bool fHWPLSEnabled; | 599 bool fHWPLSEnabled; |
588 bool fPLSHasBeenUsed; | 600 bool fPLSHasBeenUsed; |
589 | 601 |
590 typedef GrGpu INHERITED; | 602 typedef GrGpu INHERITED; |
591 friend class GrGLPathRendering; // For accessing setTextureUnit. | 603 friend class GrGLPathRendering; // For accessing setTextureUnit. |
592 }; | 604 }; |
593 | 605 |
594 #endif | 606 #endif |
OLD | NEW |