| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 void setTextureUnit(int unitIdx); | 165 void setTextureUnit(int unitIdx); |
| 166 | 166 |
| 167 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset | 167 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt
es gives the offset |
| 168 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start | 168 // an into the index buffer. It does not account for drawInfo.startIndex() b
ut rather the start |
| 169 // index is relative to the returned offset. | 169 // index is relative to the returned offset. |
| 170 void setupGeometry(const GrOptDrawState&, | 170 void setupGeometry(const GrOptDrawState&, |
| 171 const GrDrawTarget::DrawInfo& info, | 171 const GrDrawTarget::DrawInfo& info, |
| 172 size_t* indexOffsetInBytes); | 172 size_t* indexOffsetInBytes); |
| 173 | 173 |
| 174 // Subclasses should call this to flush the blend state. | 174 // Subclasses should call this to flush the blend state. |
| 175 // The params should be the final coefficients to apply | 175 void flushBlend(const GrOptDrawState& optState); |
| 176 // (after any blending optimizations or dual source blending considerations | |
| 177 // have been accounted for). | |
| 178 void flushBlend(const GrOptDrawState& optState, bool isLines, | |
| 179 GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff); | |
| 180 | 176 |
| 181 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex
t); } | 177 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex
t); } |
| 182 | 178 |
| 183 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); | 179 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); |
| 184 | 180 |
| 185 class ProgramCache : public ::SkNoncopyable { | 181 class ProgramCache : public ::SkNoncopyable { |
| 186 public: | 182 public: |
| 187 ProgramCache(GrGpuGL* gpu); | 183 ProgramCache(GrGpuGL* gpu); |
| 188 ~ProgramCache(); | 184 ~ProgramCache(); |
| 189 | 185 |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 444 |
| 449 // we record what stencil format worked last time to hopefully exit early | 445 // we record what stencil format worked last time to hopefully exit early |
| 450 // from our loop that tries stencil formats and calls check fb status. | 446 // from our loop that tries stencil formats and calls check fb status. |
| 451 int fLastSuccessfulStencilFmtIdx; | 447 int fLastSuccessfulStencilFmtIdx; |
| 452 | 448 |
| 453 typedef GrGpu INHERITED; | 449 typedef GrGpu INHERITED; |
| 454 friend class GrGLPathRendering; // For accessing setTextureUnit. | 450 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 455 }; | 451 }; |
| 456 | 452 |
| 457 #endif | 453 #endif |
| OLD | NEW |