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

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

Issue 240123002: Double assignment in GrGpuGL::configToGLFormats() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 | « no previous file | 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 "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 *externalFormat = GR_GL_RGBA; 2475 *externalFormat = GR_GL_RGBA;
2476 if (getSizedInternalFormat) { 2476 if (getSizedInternalFormat) {
2477 *internalFormat = GR_GL_RGBA4; 2477 *internalFormat = GR_GL_RGBA4;
2478 } else { 2478 } else {
2479 *internalFormat = GR_GL_RGBA; 2479 *internalFormat = GR_GL_RGBA;
2480 } 2480 }
2481 *externalType = GR_GL_UNSIGNED_SHORT_4_4_4_4; 2481 *externalType = GR_GL_UNSIGNED_SHORT_4_4_4_4;
2482 break; 2482 break;
2483 case kIndex_8_GrPixelConfig: 2483 case kIndex_8_GrPixelConfig:
2484 if (this->caps()->eightBitPaletteSupport()) { 2484 if (this->caps()->eightBitPaletteSupport()) {
2485 *internalFormat = GR_GL_PALETTE8_RGBA8;
2486 // glCompressedTexImage doesn't take external params 2485 // glCompressedTexImage doesn't take external params
2487 *externalFormat = GR_GL_PALETTE8_RGBA8; 2486 *externalFormat = GR_GL_PALETTE8_RGBA8;
2488 // no sized/unsized internal format distinction here 2487 // no sized/unsized internal format distinction here
2489 *internalFormat = GR_GL_PALETTE8_RGBA8; 2488 *internalFormat = GR_GL_PALETTE8_RGBA8;
2490 // unused with CompressedTexImage 2489 // unused with CompressedTexImage
2491 *externalType = GR_GL_UNSIGNED_BYTE; 2490 *externalType = GR_GL_UNSIGNED_BYTE;
2492 } else { 2491 } else {
2493 return false; 2492 return false;
2494 } 2493 }
2495 break; 2494 break;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2834 this->setVertexArrayID(gpu, 0); 2833 this->setVertexArrayID(gpu, 0);
2835 } 2834 }
2836 int attrCount = gpu->glCaps().maxVertexAttributes(); 2835 int attrCount = gpu->glCaps().maxVertexAttributes();
2837 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2836 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2838 fDefaultVertexArrayAttribState.resize(attrCount); 2837 fDefaultVertexArrayAttribState.resize(attrCount);
2839 } 2838 }
2840 attribState = &fDefaultVertexArrayAttribState; 2839 attribState = &fDefaultVertexArrayAttribState;
2841 } 2840 }
2842 return attribState; 2841 return attribState;
2843 } 2842 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698