| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 GrGLPathRendering* glPathRendering() { | 50 GrGLPathRendering* glPathRendering() { |
| 51 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport()); | 51 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport()); |
| 52 return static_cast<GrGLPathRendering*>(pathRendering()); | 52 return static_cast<GrGLPathRendering*>(pathRendering()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void discard(GrRenderTarget*) override; | 55 void discard(GrRenderTarget*) override; |
| 56 | 56 |
| 57 // Used by GrGLProgram to configure OpenGL state. | 57 // Used by GrGLProgram to configure OpenGL state. |
| 58 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* te
xture); | 58 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* te
xture); |
| 59 | 59 |
| 60 bool getReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeight,
size_t rowBytes, |
| 61 GrPixelConfig readConfig, DrawPreference*, |
| 62 ReadPixelTempDrawInfo*) override; |
| 63 |
| 64 |
| 60 // GrGpu overrides | 65 // GrGpu overrides |
| 61 GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, | |
| 62 GrPixelConfig surfaceConfig) const o
verride; | |
| 63 GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, | 66 GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, |
| 64 GrPixelConfig surfaceConfig) const
override; | 67 GrPixelConfig surfaceConfig) const
override; |
| 65 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const
override; | 68 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const
override; |
| 66 bool readPixelsWillPayForYFlip(GrRenderTarget* renderTarget, | |
| 67 int left, int top, | |
| 68 int width, int height, | |
| 69 GrPixelConfig config, | |
| 70 size_t rowBytes) const override; | |
| 71 bool fullReadPixelsIsFasterThanPartial() const override; | |
| 72 | 69 |
| 73 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const
override; | 70 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const
override; |
| 74 | 71 |
| 75 // These functions should be used to bind GL objects. They track the GL stat
e and skip redundant | 72 // These functions should be used to bind GL objects. They track the GL stat
e and skip redundant |
| 76 // bindings. Making the equivalent glBind calls directly will confuse the st
ate tracking. | 73 // bindings. Making the equivalent glBind calls directly will confuse the st
ate tracking. |
| 77 void bindVertexArray(GrGLuint id) { | 74 void bindVertexArray(GrGLuint id) { |
| 78 fHWGeometryState.setVertexArrayID(this, id); | 75 fHWGeometryState.setVertexArrayID(this, id); |
| 79 } | 76 } |
| 80 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { | 77 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { |
| 81 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id); | 78 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id); |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 497 |
| 501 // we record what stencil format worked last time to hopefully exit early | 498 // we record what stencil format worked last time to hopefully exit early |
| 502 // from our loop that tries stencil formats and calls check fb status. | 499 // from our loop that tries stencil formats and calls check fb status. |
| 503 int fLastSuccessfulStencilFmtIdx; | 500 int fLastSuccessfulStencilFmtIdx; |
| 504 | 501 |
| 505 typedef GrGpu INHERITED; | 502 typedef GrGpu INHERITED; |
| 506 friend class GrGLPathRendering; // For accessing setTextureUnit. | 503 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 507 }; | 504 }; |
| 508 | 505 |
| 509 #endif | 506 #endif |
| OLD | NEW |