| 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 | |
| 174 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; | 162 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; |
| 175 | 163 |
| 176 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; | 164 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; |
| 177 | 165 |
| 178 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, | 166 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, |
| 179 GrTextureProducer::CopyParams*) const overri
de; | 167 GrTextureProducer::CopyParams*) const overri
de; |
| 180 | 168 |
| 181 // Checks whether glReadPixels can be called to get pixel values in readConf
ig from the | 169 // Checks whether glReadPixels can be called to get pixel values in readConf
ig from the |
| 182 // render target. | 170 // render target. |
| 183 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); | 171 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } fPLSSetupProgram; | 585 } fPLSSetupProgram; |
| 598 | 586 |
| 599 bool fHWPLSEnabled; | 587 bool fHWPLSEnabled; |
| 600 bool fPLSHasBeenUsed; | 588 bool fPLSHasBeenUsed; |
| 601 | 589 |
| 602 typedef GrGpu INHERITED; | 590 typedef GrGpu INHERITED; |
| 603 friend class GrGLPathRendering; // For accessing setTextureUnit. | 591 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 604 }; | 592 }; |
| 605 | 593 |
| 606 #endif | 594 #endif |
| OLD | NEW |