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 #include "GrGpuGL.h" | 9 #include "GrGpuGL.h" |
10 #include "GrGLNameAllocator.h" | 10 #include "GrGLNameAllocator.h" |
(...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2687 *internalFormat = GR_GL_COMPRESSED_LUMINANCE_LATC1; | 2687 *internalFormat = GR_GL_COMPRESSED_LUMINANCE_LATC1; |
2688 break; | 2688 break; |
2689 case GrGLCaps::kRGTC_LATCAlias: | 2689 case GrGLCaps::kRGTC_LATCAlias: |
2690 *internalFormat = GR_GL_COMPRESSED_RED_RGTC1; | 2690 *internalFormat = GR_GL_COMPRESSED_RED_RGTC1; |
2691 break; | 2691 break; |
2692 case GrGLCaps::k3DC_LATCAlias: | 2692 case GrGLCaps::k3DC_LATCAlias: |
2693 *internalFormat = GR_GL_COMPRESSED_3DC_X; | 2693 *internalFormat = GR_GL_COMPRESSED_3DC_X; |
2694 break; | 2694 break; |
2695 } | 2695 } |
2696 break; | 2696 break; |
| 2697 case kR11_EAC_GrPixelConfig: |
| 2698 *internalFormat = GR_GL_COMPRESSED_R11; |
| 2699 break; |
2697 default: | 2700 default: |
2698 return false; | 2701 return false; |
2699 } | 2702 } |
2700 return true; | 2703 return true; |
2701 } | 2704 } |
2702 | 2705 |
2703 void GrGpuGL::setTextureUnit(int unit) { | 2706 void GrGpuGL::setTextureUnit(int unit) { |
2704 SkASSERT(unit >= 0 && unit < fHWBoundTextures.count()); | 2707 SkASSERT(unit >= 0 && unit < fHWBoundTextures.count()); |
2705 if (unit != fHWActiveTextureUnitIdx) { | 2708 if (unit != fHWActiveTextureUnitIdx) { |
2706 GL_CALL(ActiveTexture(GR_GL_TEXTURE0 + unit)); | 2709 GL_CALL(ActiveTexture(GR_GL_TEXTURE0 + unit)); |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3015 this->setVertexArrayID(gpu, 0); | 3018 this->setVertexArrayID(gpu, 0); |
3016 } | 3019 } |
3017 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3020 int attrCount = gpu->glCaps().maxVertexAttributes(); |
3018 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3021 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
3019 fDefaultVertexArrayAttribState.resize(attrCount); | 3022 fDefaultVertexArrayAttribState.resize(attrCount); |
3020 } | 3023 } |
3021 attribState = &fDefaultVertexArrayAttribState; | 3024 attribState = &fDefaultVertexArrayAttribState; |
3022 } | 3025 } |
3023 return attribState; | 3026 return attribState; |
3024 } | 3027 } |
OLD | NEW |