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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void* buffer, | 146 void* buffer, |
147 size_t rowBytes) SK_OVERRIDE; | 147 size_t rowBytes) SK_OVERRIDE; |
148 | 148 |
149 virtual bool onWriteTexturePixels(GrTexture* texture, | 149 virtual bool onWriteTexturePixels(GrTexture* texture, |
150 int left, int top, int width, int height, | 150 int left, int top, int width, int height, |
151 GrPixelConfig config, const void* buffer, | 151 GrPixelConfig config, const void* buffer, |
152 size_t rowBytes) SK_OVERRIDE; | 152 size_t rowBytes) SK_OVERRIDE; |
153 | 153 |
154 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; | 154 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; |
155 | 155 |
156 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE; | 156 virtual void onGpuDraw(const GrDrawTarget::DrawInfo&) SK_OVERRIDE; |
157 | 157 |
158 | 158 |
159 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; | 159 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; |
160 virtual bool flushGraphicsState(DrawType, | 160 virtual bool flushGraphicsState(DrawType, |
161 const GrClipMaskManager::ScissorState&, | 161 const GrClipMaskManager::ScissorState&, |
162 const GrDeviceCoordTexture* dstCopy) SK_OVER
RIDE; | 162 const GrDeviceCoordTexture* dstCopy) SK_OVER
RIDE; |
163 | 163 |
164 // GrDrawTarget overrides | 164 // GrDrawTarget overrides |
165 virtual void didAddGpuTraceMarker() SK_OVERRIDE; | 165 virtual void didAddGpuTraceMarker() SK_OVERRIDE; |
166 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; | 166 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; |
167 | 167 |
168 // binds texture unit in GL | 168 // binds texture unit in GL |
169 void setTextureUnit(int unitIdx); | 169 void setTextureUnit(int unitIdx); |
170 | 170 |
171 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 171 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
172 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start | 172 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start |
173 // index is relative to the returned offset. | 173 // index is relative to the returned offset. |
174 void setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes); | 174 void setupGeometry(const GrDrawTarget::DrawInfo& info, size_t* indexOffsetIn
Bytes); |
175 | 175 |
176 // Subclasses should call this to flush the blend state. | 176 // Subclasses should call this to flush the blend state. |
177 // The params should be the final coefficients to apply | 177 // The params should be the final coefficients to apply |
178 // (after any blending optimizations or dual source blending considerations | 178 // (after any blending optimizations or dual source blending considerations |
179 // have been accounted for). | 179 // have been accounted for). |
180 void flushBlend(const GrOptDrawState& optState, bool isLines, | 180 void flushBlend(const GrOptDrawState& optState, bool isLines, |
181 GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff); | 181 GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff); |
182 | 182 |
183 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex
t); } | 183 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex
t); } |
184 | 184 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 450 |
451 // we record what stencil format worked last time to hopefully exit early | 451 // we record what stencil format worked last time to hopefully exit early |
452 // from our loop that tries stencil formats and calls check fb status. | 452 // from our loop that tries stencil formats and calls check fb status. |
453 int fLastSuccessfulStencilFmtIdx; | 453 int fLastSuccessfulStencilFmtIdx; |
454 | 454 |
455 typedef GrGpu INHERITED; | 455 typedef GrGpu INHERITED; |
456 friend class GrGLPathRendering; // For accessing setTextureUnit. | 456 friend class GrGLPathRendering; // For accessing setTextureUnit. |
457 }; | 457 }; |
458 | 458 |
459 #endif | 459 #endif |
OLD | NEW |