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

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

Issue 1580003002: Hide formats in GrGLCaps and use specific getters for different GL functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixes Created 4 years, 11 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 "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 735
736 // in case we need a temporary, trimmed copy of the src pixels 736 // in case we need a temporary, trimmed copy of the src pixels
737 #if defined(GOOGLE3) 737 #if defined(GOOGLE3)
738 // Stack frame size is limited in GOOGLE3. 738 // Stack frame size is limited in GOOGLE3.
739 SkAutoSMalloc<64 * 128> tempStorage; 739 SkAutoSMalloc<64 * 128> tempStorage;
740 #else 740 #else
741 SkAutoSMalloc<128 * 128> tempStorage; 741 SkAutoSMalloc<128 * 128> tempStorage;
742 #endif 742 #endif
743 743
744 // Internal format comes from the texture desc. 744 // Internal format comes from the texture desc.
745 GrGLenum internalFormat = 745 GrGLenum internalFormat;
746 this->glCaps().configGLFormats(desc.fConfig).fInternalFormatTexImage;
747
748 // External format and type come from the upload data. 746 // External format and type come from the upload data.
749 GrGLenum externalFormat = 747 GrGLenum externalFormat;
750 this->glCaps().configGLFormats(dataConfig).fExternalFormatForTexImage; 748 GrGLenum externalType;
751 GrGLenum externalType = this->glCaps().configGLFormats(dataConfig).fExternal Type; 749 if (!this->glCaps().getTexImageFormats(desc.fConfig, dataConfig, &internalFo rmat,
752 750 &externalFormat, &externalType)) {
751 return false;
752 }
753 /* 753 /*
754 * Check whether to allocate a temporary buffer for flipping y or 754 * Check whether to allocate a temporary buffer for flipping y or
755 * because our srcData has extra bytes past each row. If so, we need 755 * because our srcData has extra bytes past each row. If so, we need
756 * to trim those off here, since GL ES may not let us specify 756 * to trim those off here, since GL ES may not let us specify
757 * GL_UNPACK_ROW_LENGTH. 757 * GL_UNPACK_ROW_LENGTH.
758 */ 758 */
759 bool restoreGLRowLength = false; 759 bool restoreGLRowLength = false;
760 bool swFlipY = false; 760 bool swFlipY = false;
761 bool glFlipY = false; 761 bool glFlipY = false;
762 if (dataOrOffset) { 762 if (dataOrOffset) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, config_alignment(dataConfig) )); 804 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, config_alignment(dataConfig) ));
805 } 805 }
806 bool succeeded = true; 806 bool succeeded = true;
807 if (kNewTexture_UploadType == uploadType) { 807 if (kNewTexture_UploadType == uploadType) {
808 if (dataOrOffset && 808 if (dataOrOffset &&
809 !(0 == left && 0 == top && desc.fWidth == width && desc.fHeight == h eight)) { 809 !(0 == left && 0 == top && desc.fWidth == width && desc.fHeight == h eight)) {
810 succeeded = false; 810 succeeded = false;
811 } else { 811 } else {
812 CLEAR_ERROR_BEFORE_ALLOC(this->glInterface()); 812 CLEAR_ERROR_BEFORE_ALLOC(this->glInterface());
813 GL_ALLOC_CALL(this->glInterface(), TexImage2D(target, 0, internalFor mat, desc.fWidth, 813 GL_ALLOC_CALL(this->glInterface(), TexImage2D(target, 0, internalFor mat, desc.fWidth,
814 desc.fHeight, 0, exte rnalFormat, 814 desc.fHeight, 0, exter nalFormat,
815 externalType, dataOrOf fset)); 815 externalType, dataOrOf fset));
816 GrGLenum error = check_alloc_error(desc, this->glInterface()); 816 GrGLenum error = check_alloc_error(desc, this->glInterface());
817 if (error != GR_GL_NO_ERROR) { 817 if (error != GR_GL_NO_ERROR) {
818 succeeded = false; 818 succeeded = false;
819 } 819 }
820 } 820 }
821 } else { 821 } else {
822 if (swFlipY || glFlipY) { 822 if (swFlipY || glFlipY) {
823 top = desc.fHeight - (top + height); 823 top = desc.fHeight - (top + height);
824 } 824 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 #ifdef SK_DEBUG 871 #ifdef SK_DEBUG
872 else { 872 else {
873 SkASSERT(height <= desc.fHeight); 873 SkASSERT(height <= desc.fHeight);
874 } 874 }
875 #endif 875 #endif
876 876
877 // Make sure that the width and height that we pass to OpenGL 877 // Make sure that the width and height that we pass to OpenGL
878 // is a multiple of the block size. 878 // is a multiple of the block size.
879 size_t dataSize = GrCompressedFormatDataSize(desc.fConfig, width, height); 879 size_t dataSize = GrCompressedFormatDataSize(desc.fConfig, width, height);
880 880
881 // We only need the internal format for compressed 2D textures. There is on 881 // We only need the internal format for compressed 2D textures.
882 // sized vs base internal format distinction for compressed textures. 882 GrGLenum internalFormat;
883 GrGLenum internalFormat =this->glCaps().configGLFormats(desc.fConfig).fSized InternalFormat; 883 if (!this->glCaps().getCompressedTexImageFormats(desc.fConfig, &internalForm at)) {
884 return false;
885 }
884 886
885 if (kNewTexture_UploadType == uploadType) { 887 if (kNewTexture_UploadType == uploadType) {
886 CLEAR_ERROR_BEFORE_ALLOC(this->glInterface()); 888 CLEAR_ERROR_BEFORE_ALLOC(this->glInterface());
887 GL_ALLOC_CALL(this->glInterface(), 889 GL_ALLOC_CALL(this->glInterface(),
888 CompressedTexImage2D(target, 890 CompressedTexImage2D(target,
889 0, // level 891 0, // level
890 internalFormat, 892 internalFormat,
891 width, height, 893 width, height,
892 0, // border 894 0, // border
893 SkToInt(dataSize), 895 SkToInt(dataSize),
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 // the texture bound to the other. The exception is the IMG multisample exte nsion. With this 983 // the texture bound to the other. The exception is the IMG multisample exte nsion. With this
982 // extension the texture is multisampled when rendered to and then auto-reso lves it when it is 984 // extension the texture is multisampled when rendered to and then auto-reso lves it when it is
983 // rendered from. 985 // rendered from.
984 if (desc.fSampleCnt > 0 && this->glCaps().usesMSAARenderBuffers()) { 986 if (desc.fSampleCnt > 0 && this->glCaps().usesMSAARenderBuffers()) {
985 GL_CALL(GenFramebuffers(1, &idDesc->fRTFBOID)); 987 GL_CALL(GenFramebuffers(1, &idDesc->fRTFBOID));
986 GL_CALL(GenRenderbuffers(1, &idDesc->fMSColorRenderbufferID)); 988 GL_CALL(GenRenderbuffers(1, &idDesc->fMSColorRenderbufferID));
987 if (!idDesc->fRTFBOID || 989 if (!idDesc->fRTFBOID ||
988 !idDesc->fMSColorRenderbufferID) { 990 !idDesc->fMSColorRenderbufferID) {
989 goto FAILED; 991 goto FAILED;
990 } 992 }
991 // All ES versions (thus far) require sized internal formats for render buffers. 993 if (!this->glCaps().getRenderbufferFormat(desc.fConfig, &colorRenderbuff erFormat)) {
992 // TODO: Always use sized internal format? 994 return false;
993 // If this rule gets more complicated, add a field to ConfigEntry rather than logic here. 995 }
994 colorRenderbufferFormat = kGLES_GrGLStandard == this->glStandard() ?
995 this->glCaps().configGLFormats(desc.fConfig).fSizedI nternalFormat :
996 this->glCaps().configGLFormats(desc.fConfig).fBaseIn ternalFormat;
997 } else { 996 } else {
998 idDesc->fRTFBOID = idDesc->fTexFBOID; 997 idDesc->fRTFBOID = idDesc->fTexFBOID;
999 } 998 }
1000 999
1001 // below here we may bind the FBO 1000 // below here we may bind the FBO
1002 fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID; 1001 fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID;
1003 if (idDesc->fRTFBOID != idDesc->fTexFBOID) { 1002 if (idDesc->fRTFBOID != idDesc->fTexFBOID) {
1004 SkASSERT(desc.fSampleCnt > 0); 1003 SkASSERT(desc.fSampleCnt > 0);
1005 GL_CALL(BindRenderbuffer(GR_GL_RENDERBUFFER, idDesc->fMSColorRenderbuffe rID)); 1004 GL_CALL(BindRenderbuffer(GR_GL_RENDERBUFFER, idDesc->fMSColorRenderbuffe rID));
1006 if (!renderbuffer_storage_msaa(*fGLContext, 1005 if (!renderbuffer_storage_msaa(*fGLContext,
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 GL_CALL(TexParameteri(GR_GL_TEXTURE_2D, 1259 GL_CALL(TexParameteri(GR_GL_TEXTURE_2D,
1261 GR_GL_TEXTURE_MIN_FILTER, 1260 GR_GL_TEXTURE_MIN_FILTER,
1262 GR_GL_NEAREST)); 1261 GR_GL_NEAREST));
1263 GL_CALL(TexParameteri(GR_GL_TEXTURE_2D, 1262 GL_CALL(TexParameteri(GR_GL_TEXTURE_2D,
1264 GR_GL_TEXTURE_WRAP_S, 1263 GR_GL_TEXTURE_WRAP_S,
1265 GR_GL_CLAMP_TO_EDGE)); 1264 GR_GL_CLAMP_TO_EDGE));
1266 GL_CALL(TexParameteri(GR_GL_TEXTURE_2D, 1265 GL_CALL(TexParameteri(GR_GL_TEXTURE_2D,
1267 GR_GL_TEXTURE_WRAP_T, 1266 GR_GL_TEXTURE_WRAP_T,
1268 GR_GL_CLAMP_TO_EDGE)); 1267 GR_GL_CLAMP_TO_EDGE));
1269 1268
1270 const GrGLCaps::ConfigFormats colorFormats = this->glCaps().configGLForm ats(config); 1269 GrGLenum internalFormat;
1271 1270 GrGLenum externalFormat;
1271 GrGLenum externalType;
1272 if (!this->glCaps().getTexImageFormats(config, config, &internalFormat, &externalFormat,
1273 &externalType)) {
1274 return false;
1275 }
1272 CLEAR_ERROR_BEFORE_ALLOC(this->glInterface()); 1276 CLEAR_ERROR_BEFORE_ALLOC(this->glInterface());
1273 GL_ALLOC_CALL(this->glInterface(), TexImage2D(GR_GL_TEXTURE_2D, 1277 GL_ALLOC_CALL(this->glInterface(), TexImage2D(GR_GL_TEXTURE_2D,
1274 0, 1278 0,
1275 colorFormats.fInternalForm atTexImage, 1279 internalFormat,
1276 kSize, 1280 kSize,
1277 kSize, 1281 kSize,
1278 0, 1282 0,
1279 colorFormats.fExternalForm atForTexImage, 1283 externalFormat,
1280 colorFormats.fExternalType , 1284 externalType,
1281 NULL)); 1285 NULL));
1282 if (GR_GL_NO_ERROR != CHECK_ALLOC_ERROR(this->glInterface())) { 1286 if (GR_GL_NO_ERROR != CHECK_ALLOC_ERROR(this->glInterface())) {
1283 GL_CALL(DeleteTextures(1, &colorID)); 1287 GL_CALL(DeleteTextures(1, &colorID));
1284 return -1; 1288 return -1;
1285 } 1289 }
1286 1290
1287 // unbind the texture from the texture unit before binding it to the fra me buffer 1291 // unbind the texture from the texture unit before binding it to the fra me buffer
1288 GL_CALL(BindTexture(GR_GL_TEXTURE_2D, 0)); 1292 GL_CALL(BindTexture(GR_GL_TEXTURE_2D, 0));
1289 1293
1290 // Create Framebuffer 1294 // Create Framebuffer
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 GrGLRenderTarget* tgt = static_cast<GrGLRenderTarget*>(surface->asRenderTarg et()); 2013 GrGLRenderTarget* tgt = static_cast<GrGLRenderTarget*>(surface->asRenderTarg et());
2010 if (!tgt) { 2014 if (!tgt) {
2011 return false; 2015 return false;
2012 } 2016 }
2013 2017
2014 // OpenGL doesn't do sRGB <-> linear conversions when reading and writing pi xels. 2018 // OpenGL doesn't do sRGB <-> linear conversions when reading and writing pi xels.
2015 if (GrPixelConfigIsSRGB(surface->config()) != GrPixelConfigIsSRGB(config)) { 2019 if (GrPixelConfigIsSRGB(surface->config()) != GrPixelConfigIsSRGB(config)) {
2016 return false; 2020 return false;
2017 } 2021 }
2018 2022
2019 GrGLenum format = this->glCaps().configGLFormats(config).fExternalFormat; 2023 GrGLenum externalFormat;
2020 GrGLenum type = this->glCaps().configGLFormats(config).fExternalType; 2024 GrGLenum externalType;
2025 if (!this->glCaps().getReadPixelsFormat(surface->config(), config, &external Format,
2026 &externalType)) {
2027 return false;
2028 }
2021 bool flipY = kBottomLeft_GrSurfaceOrigin == surface->origin(); 2029 bool flipY = kBottomLeft_GrSurfaceOrigin == surface->origin();
2022 2030
2023 // resolve the render target if necessary 2031 // resolve the render target if necessary
2024 switch (tgt->getResolveType()) { 2032 switch (tgt->getResolveType()) {
2025 case GrGLRenderTarget::kCantResolve_ResolveType: 2033 case GrGLRenderTarget::kCantResolve_ResolveType:
2026 return false; 2034 return false;
2027 case GrGLRenderTarget::kAutoResolves_ResolveType: 2035 case GrGLRenderTarget::kAutoResolves_ResolveType:
2028 this->flushRenderTarget(tgt, &SkIRect::EmptyIRect()); 2036 this->flushRenderTarget(tgt, &SkIRect::EmptyIRect());
2029 break; 2037 break;
2030 case GrGLRenderTarget::kCanResolve_ResolveType: 2038 case GrGLRenderTarget::kCanResolve_ResolveType:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 readDst = scratch.get(); 2071 readDst = scratch.get();
2064 } 2072 }
2065 } 2073 }
2066 if (flipY && this->glCaps().packFlipYSupport()) { 2074 if (flipY && this->glCaps().packFlipYSupport()) {
2067 GL_CALL(PixelStorei(GR_GL_PACK_REVERSE_ROW_ORDER, 1)); 2075 GL_CALL(PixelStorei(GR_GL_PACK_REVERSE_ROW_ORDER, 1));
2068 } 2076 }
2069 GL_CALL(PixelStorei(GR_GL_PACK_ALIGNMENT, config_alignment(config))); 2077 GL_CALL(PixelStorei(GR_GL_PACK_ALIGNMENT, config_alignment(config)));
2070 2078
2071 GL_CALL(ReadPixels(readRect.fLeft, readRect.fBottom, 2079 GL_CALL(ReadPixels(readRect.fLeft, readRect.fBottom,
2072 readRect.fWidth, readRect.fHeight, 2080 readRect.fWidth, readRect.fHeight,
2073 format, type, readDst)); 2081 externalFormat, externalType, readDst));
2074 if (readDstRowBytes != tightRowBytes) { 2082 if (readDstRowBytes != tightRowBytes) {
2075 SkASSERT(this->glCaps().packRowLengthSupport()); 2083 SkASSERT(this->glCaps().packRowLengthSupport());
2076 GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH, 0)); 2084 GL_CALL(PixelStorei(GR_GL_PACK_ROW_LENGTH, 0));
2077 } 2085 }
2078 if (flipY && this->glCaps().packFlipYSupport()) { 2086 if (flipY && this->glCaps().packFlipYSupport()) {
2079 GL_CALL(PixelStorei(GR_GL_PACK_REVERSE_ROW_ORDER, 0)); 2087 GL_CALL(PixelStorei(GR_GL_PACK_REVERSE_ROW_ORDER, 0));
2080 flipY = false; 2088 flipY = false;
2081 } 2089 }
2082 2090
2083 // now reverse the order of the rows, since GL's are bottom-to-top, but our 2091 // now reverse the order of the rows, since GL's are bottom-to-top, but our
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 fHWBlendState.fDstCoeff != dstCoeff) { 2444 fHWBlendState.fDstCoeff != dstCoeff) {
2437 GL_CALL(BlendFunc(gXfermodeCoeff2Blend[srcCoeff], 2445 GL_CALL(BlendFunc(gXfermodeCoeff2Blend[srcCoeff],
2438 gXfermodeCoeff2Blend[dstCoeff])); 2446 gXfermodeCoeff2Blend[dstCoeff]));
2439 fHWBlendState.fSrcCoeff = srcCoeff; 2447 fHWBlendState.fSrcCoeff = srcCoeff;
2440 fHWBlendState.fDstCoeff = dstCoeff; 2448 fHWBlendState.fDstCoeff = dstCoeff;
2441 } 2449 }
2442 2450
2443 GrColor blendConst = blendInfo.fBlendConstant; 2451 GrColor blendConst = blendInfo.fBlendConstant;
2444 if ((BlendCoeffReferencesConstant(srcCoeff) || 2452 if ((BlendCoeffReferencesConstant(srcCoeff) ||
2445 BlendCoeffReferencesConstant(dstCoeff)) && 2453 BlendCoeffReferencesConstant(dstCoeff)) &&
2446 (!fHWBlendState.fConstColorValid || 2454 (!fHWBlendState.fConstColorValid || fHWBlendState.fConstColor != blendCo nst)) {
2447 fHWBlendState.fConstColor != blendConst)) {
2448 GrGLfloat c[4]; 2455 GrGLfloat c[4];
2449 GrColorToRGBAFloat(blendConst, c); 2456 GrColorToRGBAFloat(blendConst, c);
2450 GL_CALL(BlendColor(c[0], c[1], c[2], c[3])); 2457 GL_CALL(BlendColor(c[0], c[1], c[2], c[3]));
2451 fHWBlendState.fConstColor = blendConst; 2458 fHWBlendState.fConstColor = blendConst;
2452 fHWBlendState.fConstColorValid = true; 2459 fHWBlendState.fConstColorValid = true;
2453 } 2460 }
2454 } 2461 }
2455 2462
2456 static inline GrGLenum tile_to_gl_wrap(SkShader::TileMode tm) { 2463 static inline GrGLenum tile_to_gl_wrap(SkShader::TileMode tm) {
2457 static const GrGLenum gWrapModes[] = { 2464 static const GrGLenum gWrapModes[] = {
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
3319 info->fID = 0; 3326 info->fID = 0;
3320 GL_CALL(GenTextures(1, &info->fID)); 3327 GL_CALL(GenTextures(1, &info->fID));
3321 GL_CALL(ActiveTexture(GR_GL_TEXTURE0)); 3328 GL_CALL(ActiveTexture(GR_GL_TEXTURE0));
3322 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, 1)); 3329 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, 1));
3323 GL_CALL(BindTexture(info->fTarget, info->fID)); 3330 GL_CALL(BindTexture(info->fTarget, info->fID));
3324 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_MAG_FILTER, GR_GL_NEAREST )); 3331 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_MAG_FILTER, GR_GL_NEAREST ));
3325 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_MIN_FILTER, GR_GL_NEAREST )); 3332 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_MIN_FILTER, GR_GL_NEAREST ));
3326 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_WRAP_S, GR_GL_CLAMP_TO_ED GE)); 3333 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_WRAP_S, GR_GL_CLAMP_TO_ED GE));
3327 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_WRAP_T, GR_GL_CLAMP_TO_ED GE)); 3334 GL_CALL(TexParameteri(info->fTarget, GR_GL_TEXTURE_WRAP_T, GR_GL_CLAMP_TO_ED GE));
3328 3335
3329 GrGLenum internalFormat = this->glCaps().configGLFormats(config).fInternalFo rmatTexImage; 3336 GrGLenum internalFormat;
3330 GrGLenum externalFormat = this->glCaps().configGLFormats(config).fExternalFo rmatForTexImage; 3337 GrGLenum externalFormat;
3331 GrGLenum externalType = this->glCaps().configGLFormats(config).fExternalType ; 3338 GrGLenum externalType;
3339
3340 if (!this->glCaps().getTexImageFormats(config, config, &internalFormat, &ext ernalFormat,
3341 &externalType)) {
3342 delete info;
3343 #ifdef SK_IGNORE_GL_TEXTURE_TARGET
3344 return 0;
3345 #else
3346 return reinterpret_cast<GrBackendObject>(nullptr);
3347 #endif
3348 }
3332 3349
3333 GL_CALL(TexImage2D(info->fTarget, 0, internalFormat, w, h, 0, externalFormat , 3350 GL_CALL(TexImage2D(info->fTarget, 0, internalFormat, w, h, 0, externalFormat ,
3334 externalType, pixels)); 3351 externalType, pixels));
3335 3352
3336 #ifdef SK_IGNORE_GL_TEXTURE_TARGET 3353 #ifdef SK_IGNORE_GL_TEXTURE_TARGET
3337 GrGLuint id = info->fID; 3354 GrGLuint id = info->fID;
3338 delete info; 3355 delete info;
3339 return id; 3356 return id;
3340 #else 3357 #else
3341 return reinterpret_cast<GrBackendObject>(info); 3358 return reinterpret_cast<GrBackendObject>(info);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
3427 this->setVertexArrayID(gpu, 0); 3444 this->setVertexArrayID(gpu, 0);
3428 } 3445 }
3429 int attrCount = gpu->glCaps().maxVertexAttributes(); 3446 int attrCount = gpu->glCaps().maxVertexAttributes();
3430 if (fDefaultVertexArrayAttribState.count() != attrCount) { 3447 if (fDefaultVertexArrayAttribState.count() != attrCount) {
3431 fDefaultVertexArrayAttribState.resize(attrCount); 3448 fDefaultVertexArrayAttribState.resize(attrCount);
3432 } 3449 }
3433 attribState = &fDefaultVertexArrayAttribState; 3450 attribState = &fDefaultVertexArrayAttribState;
3434 } 3451 }
3435 return attribState; 3452 return attribState;
3436 } 3453 }
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