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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 bool canCopySurface(const GrSurface* dst, | 102 bool canCopySurface(const GrSurface* dst, |
103 const GrSurface* src, | 103 const GrSurface* src, |
104 const SkIRect& srcRect, | 104 const SkIRect& srcRect, |
105 const SkIPoint& dstPoint) SK_OVERRIDE; | 105 const SkIPoint& dstPoint) SK_OVERRIDE; |
106 | 106 |
107 void buildProgramDesc(GrProgramDesc*, | 107 void buildProgramDesc(GrProgramDesc*, |
108 const GrPrimitiveProcessor&, | 108 const GrPrimitiveProcessor&, |
109 const GrOptDrawState&, | 109 const GrOptDrawState&, |
110 const GrProgramDesc::DescInfo&, | 110 const GrProgramDesc::DescInfo&, |
111 GrGpu::DrawType, | |
112 const GrBatchTracker&) const SK_OVERRIDE; | 111 const GrBatchTracker&) const SK_OVERRIDE; |
113 | 112 |
114 private: | 113 private: |
115 // GrGpu overrides | 114 // GrGpu overrides |
116 void onResetContext(uint32_t resetBits) SK_OVERRIDE; | 115 void onResetContext(uint32_t resetBits) SK_OVERRIDE; |
117 | 116 |
118 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, const v
oid* srcData, | 117 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, const v
oid* srcData, |
119 size_t rowBytes) SK_OVERRIDE; | 118 size_t rowBytes) SK_OVERRIDE; |
120 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, bool budgete
d, | 119 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, bool budgete
d, |
121 const void* srcData) SK_OVERRIDE; | 120 const void* srcData) SK_OVERRIDE; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void clearStencil(GrRenderTarget*) SK_OVERRIDE; | 160 void clearStencil(GrRenderTarget*) SK_OVERRIDE; |
162 | 161 |
163 // GrDrawTarget overrides | 162 // GrDrawTarget overrides |
164 void didAddGpuTraceMarker() SK_OVERRIDE; | 163 void didAddGpuTraceMarker() SK_OVERRIDE; |
165 void didRemoveGpuTraceMarker() SK_OVERRIDE; | 164 void didRemoveGpuTraceMarker() SK_OVERRIDE; |
166 | 165 |
167 // binds texture unit in GL | 166 // binds texture unit in GL |
168 void setTextureUnit(int unitIdx); | 167 void setTextureUnit(int unitIdx); |
169 | 168 |
170 // Flushes state from GrOptDrawState to GL. Returns false if the state could
n't be set. | 169 // Flushes state from GrOptDrawState to GL. Returns false if the state could
n't be set. |
171 bool flushGLState(const DrawArgs&); | 170 // TODO we only have need to know if this is a line draw for flushing AA sta
te on some buggy |
| 171 // hardware. Evaluate if this is really necessary anymore |
| 172 bool flushGLState(const DrawArgs&, bool isLineDraw); |
172 | 173 |
173 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 174 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
174 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start | 175 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start |
175 // index is relative to the returned offset. | 176 // index is relative to the returned offset. |
176 void setupGeometry(const GrPrimitiveProcessor&, | 177 void setupGeometry(const GrPrimitiveProcessor&, |
177 const GrDrawTarget::DrawInfo& info, | 178 const GrDrawTarget::DrawInfo& info, |
178 size_t* indexOffsetInBytes); | 179 size_t* indexOffsetInBytes); |
179 | 180 |
180 // Subclasses should call this to flush the blend state. | 181 // Subclasses should call this to flush the blend state. |
181 void flushBlend(const GrXferProcessor::BlendInfo& blendInfo); | 182 void flushBlend(const GrXferProcessor::BlendInfo& blendInfo); |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 453 |
453 // we record what stencil format worked last time to hopefully exit early | 454 // we record what stencil format worked last time to hopefully exit early |
454 // from our loop that tries stencil formats and calls check fb status. | 455 // from our loop that tries stencil formats and calls check fb status. |
455 int fLastSuccessfulStencilFmtIdx; | 456 int fLastSuccessfulStencilFmtIdx; |
456 | 457 |
457 typedef GrGpu INHERITED; | 458 typedef GrGpu INHERITED; |
458 friend class GrGLPathRendering; // For accessing setTextureUnit. | 459 friend class GrGLPathRendering; // For accessing setTextureUnit. |
459 }; | 460 }; |
460 | 461 |
461 #endif | 462 #endif |
OLD | NEW |