| 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 | 8 |
| 9 | 9 |
| 10 #ifndef GrGpuGL_DEFINED | 10 #ifndef GrGpuGL_DEFINED |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual bool readPixelsWillPayForYFlip( | 50 virtual bool readPixelsWillPayForYFlip( |
| 51 GrRenderTarget* renderTarget, | 51 GrRenderTarget* renderTarget, |
| 52 int left, int top, | 52 int left, int top, |
| 53 int width, int height, | 53 int width, int height, |
| 54 GrPixelConfig config, | 54 GrPixelConfig config, |
| 55 size_t rowBytes) const SK_OVERRIDE; | 55 size_t rowBytes) const SK_OVERRIDE; |
| 56 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE; | 56 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE; |
| 57 | 57 |
| 58 virtual void abandonResources() SK_OVERRIDE; | 58 virtual void abandonResources() SK_OVERRIDE; |
| 59 | 59 |
| 60 const GrGLCaps& glCaps() const { return fGLContext.info().caps(); } | 60 const GrGLCaps& glCaps() const { return *fGLContext.info().caps(); } |
| 61 | 61 |
| 62 // These functions should be used to bind GL objects. They track the GL stat
e and skip redundant | 62 // These functions should be used to bind GL objects. They track the GL stat
e and skip redundant |
| 63 // bindings. Making the equivalent glBind calls directly will confuse the st
ate tracking. | 63 // bindings. Making the equivalent glBind calls directly will confuse the st
ate tracking. |
| 64 void bindVertexArray(GrGLuint id) { | 64 void bindVertexArray(GrGLuint id) { |
| 65 fHWGeometryState.setVertexArrayID(this, id); | 65 fHWGeometryState.setVertexArrayID(this, id); |
| 66 } | 66 } |
| 67 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { | 67 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { |
| 68 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id); | 68 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id); |
| 69 } | 69 } |
| 70 void bindVertexBuffer(GrGLuint id) { | 70 void bindVertexBuffer(GrGLuint id) { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // sets the matrix for path stenciling (uses the GL fixed pipe matrices) | 211 // sets the matrix for path stenciling (uses the GL fixed pipe matrices) |
| 212 void flushPathStencilMatrix(); | 212 void flushPathStencilMatrix(); |
| 213 | 213 |
| 214 // flushes dithering, color-mask, and face culling stat | 214 // flushes dithering, color-mask, and face culling stat |
| 215 void flushMiscFixedFunctionState(); | 215 void flushMiscFixedFunctionState(); |
| 216 | 216 |
| 217 // flushes the scissor. see the note on flushBoundTextureAndParams about | 217 // flushes the scissor. see the note on flushBoundTextureAndParams about |
| 218 // flushing the scissor after that function is called. | 218 // flushing the scissor after that function is called. |
| 219 void flushScissor(); | 219 void flushScissor(); |
| 220 | 220 |
| 221 // Inits GrDrawTarget::Caps, subclass may enable additional caps. | |
| 222 void initCaps(); | |
| 223 | |
| 224 void initFSAASupport(); | 221 void initFSAASupport(); |
| 225 | 222 |
| 226 // determines valid stencil formats | 223 // determines valid stencil formats |
| 227 void initStencilFormats(); | 224 void initStencilFormats(); |
| 228 | 225 |
| 229 void setSpareTextureUnit(); | 226 void setSpareTextureUnit(); |
| 230 | 227 |
| 231 // bound is region that may be modified and therefore has to be resolved. | 228 // bound is region that may be modified and therefore has to be resolved. |
| 232 // NULL means whole target. Can be an empty rect. | 229 // NULL means whole target. Can be an empty rect. |
| 233 void flushRenderTarget(const GrIRect* bound); | 230 void flushRenderTarget(const GrIRect* bound); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 TriState fHWWriteToColor; | 421 TriState fHWWriteToColor; |
| 425 TriState fHWDitherEnabled; | 422 TriState fHWDitherEnabled; |
| 426 GrRenderTarget* fHWBoundRenderTarget; | 423 GrRenderTarget* fHWBoundRenderTarget; |
| 427 GrTexture* fHWBoundTextures[GrDrawState::kNumStages]; | 424 GrTexture* fHWBoundTextures[GrDrawState::kNumStages]; |
| 428 ///@} | 425 ///@} |
| 429 | 426 |
| 430 // we record what stencil format worked last time to hopefully exit early | 427 // we record what stencil format worked last time to hopefully exit early |
| 431 // from our loop that tries stencil formats and calls check fb status. | 428 // from our loop that tries stencil formats and calls check fb status. |
| 432 int fLastSuccessfulStencilFmtIdx; | 429 int fLastSuccessfulStencilFmtIdx; |
| 433 | 430 |
| 434 bool fPrintedCaps; | |
| 435 | |
| 436 typedef GrGpu INHERITED; | 431 typedef GrGpu INHERITED; |
| 437 }; | 432 }; |
| 438 | 433 |
| 439 #endif | 434 #endif |
| OLD | NEW |