| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; | 150 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; |
| 151 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; | 151 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; |
| 152 GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) ove
rride; | 152 GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) ove
rride; |
| 153 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership
) override; | 153 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership
) override; |
| 154 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, | 154 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, |
| 155 GrWrapOwnership) override; | 155 GrWrapOwnership) override; |
| 156 // Given a GrPixelConfig return the index into the stencil format array on G
rGLCaps to a | 156 // Given a GrPixelConfig return the index into the stencil format array on G
rGLCaps to a |
| 157 // compatible stencil format, or negative if there is no compatible stencil
format. | 157 // compatible stencil format, or negative if there is no compatible stencil
format. |
| 158 int getCompatibleStencilIndex(GrPixelConfig config); | 158 int getCompatibleStencilIndex(GrPixelConfig config); |
| 159 | 159 |
| 160 // If |desc.fTextureStorageAllocator| exists, use that to create the | |
| 161 // texture. Otherwise, create the texture directly. | |
| 162 // Returns whether the texture is successfully created. On success, the | |
| 163 // result is stored in |info|. | |
| 164 // The texture is populated with |srcData|, if it exists. | |
| 165 // The texture parameters are cached in |initialTexParams|. | |
| 166 bool createTextureImpl(const GrSurfaceDesc& desc, GrGLTextureInfo* info, | |
| 167 bool renderTarget, const void* srcData, | |
| 168 GrGLTexture::TexParams* initialTexParams, size_t rowB
ytes); | |
| 169 bool createTextureExternalAllocatorImpl(const GrSurfaceDesc& desc, GrGLTextu
reInfo* info, | |
| 170 const void* srcData, size_t rowBytes
); | |
| 171 | |
| 172 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; | 160 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; |
| 173 | 161 |
| 174 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; | 162 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli
p) override; |
| 175 | 163 |
| 176 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, | 164 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, |
| 177 GrTextureProducer::CopyParams*) const overri
de; | 165 GrTextureProducer::CopyParams*) const overri
de; |
| 178 | 166 |
| 179 // Checks whether glReadPixels can be called to get pixel values in readConf
ig from the | 167 // Checks whether glReadPixels can be called to get pixel values in readConf
ig from the |
| 180 // render target. | 168 // render target. |
| 181 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); | 169 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 SkFAIL("Unexpected texture target type."); | 563 SkFAIL("Unexpected texture target type."); |
| 576 return 0; | 564 return 0; |
| 577 } | 565 } |
| 578 } | 566 } |
| 579 | 567 |
| 580 typedef GrGpu INHERITED; | 568 typedef GrGpu INHERITED; |
| 581 friend class GrGLPathRendering; // For accessing setTextureUnit. | 569 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 582 }; | 570 }; |
| 583 | 571 |
| 584 #endif | 572 #endif |
| OLD | NEW |