| 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 GrGpuGL_DEFINED | 8 #ifndef GrGpuGL_DEFINED |
| 9 #define GrGpuGL_DEFINED | 9 #define GrGpuGL_DEFINED |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; | 143 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; |
| 144 | 144 |
| 145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; | 145 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; |
| 146 | 146 |
| 147 | 147 |
| 148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; | 148 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; |
| 149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect, | 149 virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect, |
| 150 bool insideClip) SK_OVERRIDE; | 150 bool insideClip) SK_OVERRIDE; |
| 151 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop
y) SK_OVERRIDE; | 151 virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCop
y) SK_OVERRIDE; |
| 152 | 152 |
| 153 // GrDrawTarget ovverides | 153 // GrDrawTarget overrides |
| 154 virtual void didAddGpuTraceMarker() SK_OVERRIDE; | 154 virtual void didAddGpuTraceMarker() SK_OVERRIDE; |
| 155 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; | 155 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; |
| 156 | 156 |
| 157 // binds texture unit in GL | 157 // binds texture unit in GL |
| 158 void setTextureUnit(int unitIdx); | 158 void setTextureUnit(int unitIdx); |
| 159 | 159 |
| 160 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 160 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
| 161 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start | 161 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start |
| 162 // index is relative to the returned offset. | 162 // index is relative to the returned offset. |
| 163 void setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes); | 163 void setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 bool uploadCompressedTexData(const GrGLTexture::Desc& desc, | 260 bool uploadCompressedTexData(const GrGLTexture::Desc& desc, |
| 261 const void* data, | 261 const void* data, |
| 262 bool isNewTexture = true, | 262 bool isNewTexture = true, |
| 263 int left = 0, int top = 0, | 263 int left = 0, int top = 0, |
| 264 int width = -1, int height = -1); | 264 int width = -1, int height = -1); |
| 265 | 265 |
| 266 bool createRenderTargetObjects(int width, int height, | 266 bool createRenderTargetObjects(int width, int height, |
| 267 GrGLuint texID, | 267 GrGLuint texID, |
| 268 GrGLRenderTarget::Desc* desc); | 268 GrGLRenderTarget::Desc* desc); |
| 269 | 269 |
| 270 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect*
viewport); |
| 271 |
| 270 GrGLContext fGLContext; | 272 GrGLContext fGLContext; |
| 271 | 273 |
| 272 // GL program-related state | 274 // GL program-related state |
| 273 ProgramCache* fProgramCache; | 275 ProgramCache* fProgramCache; |
| 274 SkAutoTUnref<GrGLProgram> fCurrentProgram; | 276 SkAutoTUnref<GrGLProgram> fCurrentProgram; |
| 275 | 277 |
| 276 /////////////////////////////////////////////////////////////////////////// | 278 /////////////////////////////////////////////////////////////////////////// |
| 277 ///@name Caching of GL State | 279 ///@name Caching of GL State |
| 278 ///@{ | 280 ///@{ |
| 279 int fHWActiveTextureUnitIdx; | 281 int fHWActiveTextureUnitIdx; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 440 |
| 439 // we record what stencil format worked last time to hopefully exit early | 441 // we record what stencil format worked last time to hopefully exit early |
| 440 // from our loop that tries stencil formats and calls check fb status. | 442 // from our loop that tries stencil formats and calls check fb status. |
| 441 int fLastSuccessfulStencilFmtIdx; | 443 int fLastSuccessfulStencilFmtIdx; |
| 442 | 444 |
| 443 typedef GrGpu INHERITED; | 445 typedef GrGpu INHERITED; |
| 444 friend class GrGLPathRendering; // For accessing setTextureUnit. | 446 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 445 }; | 447 }; |
| 446 | 448 |
| 447 #endif | 449 #endif |
| OLD | NEW |