Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: src/gpu/gl/GrGpuGL.cpp

Issue 330763008: Add R11 EAC pixel config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Finding the size should be easy to do Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698