| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration(
); } | 47 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration(
); } |
| 48 const GrGLCaps& glCaps() const { return *fGLContext->caps(); } | 48 const GrGLCaps& glCaps() const { return *fGLContext->caps(); } |
| 49 | 49 |
| 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 and GrGLPathTexGenProgramEffects to configure OpenGL |
| 58 // state. |
| 58 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* te
xture); | 59 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* te
xture); |
| 59 | 60 |
| 60 // GrGpu overrides | 61 // GrGpu overrides |
| 61 GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, | 62 GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, |
| 62 GrPixelConfig surfaceConfig) const o
verride; | 63 GrPixelConfig surfaceConfig) const o
verride; |
| 63 GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, | 64 GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, |
| 64 GrPixelConfig surfaceConfig) const
override; | 65 GrPixelConfig surfaceConfig) const
override; |
| 65 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const
override; | 66 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const
override; |
| 66 bool readPixelsWillPayForYFlip(GrRenderTarget* renderTarget, | 67 bool readPixelsWillPayForYFlip(GrRenderTarget* renderTarget, |
| 67 int left, int top, | 68 int left, int top, |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 496 |
| 496 // we record what stencil format worked last time to hopefully exit early | 497 // we record what stencil format worked last time to hopefully exit early |
| 497 // from our loop that tries stencil formats and calls check fb status. | 498 // from our loop that tries stencil formats and calls check fb status. |
| 498 int fLastSuccessfulStencilFmtIdx; | 499 int fLastSuccessfulStencilFmtIdx; |
| 499 | 500 |
| 500 typedef GrGpu INHERITED; | 501 typedef GrGpu INHERITED; |
| 501 friend class GrGLPathRendering; // For accessing setTextureUnit. | 502 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 502 }; | 503 }; |
| 503 | 504 |
| 504 #endif | 505 #endif |
| OLD | NEW |