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

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

Issue 864853002: remove drawType from optState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/GrOptDrawState.cpp ('k') | src/gpu/gl/GrGLProgram.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 "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 GrGLuint programID = fCurrentProgram->programID(); 1356 GrGLuint programID = fCurrentProgram->programID();
1357 if (fHWProgramID != programID) { 1357 if (fHWProgramID != programID) {
1358 GL_CALL(UseProgram(programID)); 1358 GL_CALL(UseProgram(programID));
1359 fHWProgramID = programID; 1359 fHWProgramID = programID;
1360 } 1360 }
1361 1361
1362 if (blendInfo.fWriteColor) { 1362 if (blendInfo.fWriteColor) {
1363 this->flushBlend(blendInfo); 1363 this->flushBlend(blendInfo);
1364 } 1364 }
1365 1365
1366 fCurrentProgram->setData(*args.fPrimitiveProcessor, optState, *args.fBatchTr acker); 1366 fCurrentProgram->setData(*args.fPrimitiveProcessor, optState, *args.fBatchTr acker,
bsalomon 2015/01/21 17:43:30 curious how is draw type used here?
1367 args.fDrawType);
1367 1368
1368 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState.getRenderTa rget()); 1369 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState.getRenderTa rget());
1369 this->flushStencil(optState.getStencil()); 1370 this->flushStencil(optState.getStencil());
1370 this->flushScissor(optState.getScissorState(), glRT->getViewport(), glRT->or igin()); 1371 this->flushScissor(optState.getScissorState(), glRT->getViewport(), glRT->or igin());
1371 this->flushHWAAState(glRT, optState.isHWAntialiasState(), 1372 this->flushHWAAState(glRT, optState.isHWAntialiasState(),
1372 kDrawLines_DrawType == optState.drawType()); 1373 kDrawLines_DrawType == args.fDrawType);
1373 1374
1374 // This must come after textures are flushed because a texture may need 1375 // This must come after textures are flushed because a texture may need
1375 // to be msaa-resolved (which will modify bound FBO state). 1376 // to be msaa-resolved (which will modify bound FBO state).
1376 this->flushRenderTarget(glRT, NULL); 1377 this->flushRenderTarget(glRT, NULL);
1377 1378
1378 return true; 1379 return true;
1379 } 1380 }
1380 1381
1381 void GrGLGpu::setupGeometry(const GrPrimitiveProcessor& primProc, 1382 void GrGLGpu::setupGeometry(const GrPrimitiveProcessor& primProc,
1382 const GrDrawTarget::DrawInfo& info, 1383 const GrDrawTarget::DrawInfo& info,
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
2745 this->setVertexArrayID(gpu, 0); 2746 this->setVertexArrayID(gpu, 0);
2746 } 2747 }
2747 int attrCount = gpu->glCaps().maxVertexAttributes(); 2748 int attrCount = gpu->glCaps().maxVertexAttributes();
2748 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2749 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2749 fDefaultVertexArrayAttribState.resize(attrCount); 2750 fDefaultVertexArrayAttribState.resize(attrCount);
2750 } 2751 }
2751 attribState = &fDefaultVertexArrayAttribState; 2752 attribState = &fDefaultVertexArrayAttribState;
2752 } 2753 }
2753 return attribState; 2754 return attribState;
2754 } 2755 }
OLDNEW
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698