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

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

Issue 1139743002: GLProgramsTest 3.0 (Closed) Base URL: https://skia.googlesource.com/skia.git@randbatch11
Patch Set: feedback Created 5 years, 7 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/GrTestUtils.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | 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 "GrGLStencilAttachment.h" 10 #include "GrGLStencilAttachment.h"
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 GrXferProcessor::BlendInfo blendInfo; 1412 GrXferProcessor::BlendInfo blendInfo;
1413 const GrPipeline& pipeline = *args.fPipeline; 1413 const GrPipeline& pipeline = *args.fPipeline;
1414 args.fPipeline->getXferProcessor()->getBlendInfo(&blendInfo); 1414 args.fPipeline->getXferProcessor()->getBlendInfo(&blendInfo);
1415 1415
1416 this->flushDither(pipeline.isDitherState()); 1416 this->flushDither(pipeline.isDitherState());
1417 this->flushColorWrite(blendInfo.fWriteColor); 1417 this->flushColorWrite(blendInfo.fWriteColor);
1418 this->flushDrawFace(pipeline.getDrawFace()); 1418 this->flushDrawFace(pipeline.getDrawFace());
1419 1419
1420 fCurrentProgram.reset(fProgramCache->getProgram(args)); 1420 fCurrentProgram.reset(fProgramCache->getProgram(args));
1421 if (NULL == fCurrentProgram.get()) { 1421 if (NULL == fCurrentProgram.get()) {
1422 SkDEBUGFAIL("Failed to create program!"); 1422 GrContextDebugf(this->getContext(), "Failed to create program!\n");
1423 return false; 1423 return false;
1424 } 1424 }
1425 1425
1426 fCurrentProgram.get()->ref(); 1426 fCurrentProgram.get()->ref();
1427 1427
1428 GrGLuint programID = fCurrentProgram->programID(); 1428 GrGLuint programID = fCurrentProgram->programID();
1429 if (fHWProgramID != programID) { 1429 if (fHWProgramID != programID) {
1430 GL_CALL(UseProgram(programID)); 1430 GL_CALL(UseProgram(programID));
1431 fHWProgramID = programID; 1431 fHWProgramID = programID;
1432 } 1432 }
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 this->setVertexArrayID(gpu, 0); 2849 this->setVertexArrayID(gpu, 0);
2850 } 2850 }
2851 int attrCount = gpu->glCaps().maxVertexAttributes(); 2851 int attrCount = gpu->glCaps().maxVertexAttributes();
2852 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2852 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2853 fDefaultVertexArrayAttribState.resize(attrCount); 2853 fDefaultVertexArrayAttribState.resize(attrCount);
2854 } 2854 }
2855 attribState = &fDefaultVertexArrayAttribState; 2855 attribState = &fDefaultVertexArrayAttribState;
2856 } 2856 }
2857 return attribState; 2857 return attribState;
2858 } 2858 }
OLDNEW
« no previous file with comments | « src/gpu/GrTestUtils.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698