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

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

Issue 209413006: Make it possible to draw multiple paths at once to a draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comment Created 6 years, 9 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/GrGpuGL.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 #include "GrGpuGL.h" 8 #include "GrGpuGL.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 &desc); 244 &desc);
245 245
246 fCurrentProgram.reset(fProgramCache->getProgram(desc, 246 fCurrentProgram.reset(fProgramCache->getProgram(desc,
247 colorStages.begin(), 247 colorStages.begin(),
248 coverageStages.begin())) ; 248 coverageStages.begin())) ;
249 if (NULL == fCurrentProgram.get()) { 249 if (NULL == fCurrentProgram.get()) {
250 SkDEBUGFAIL("Failed to create program!"); 250 SkDEBUGFAIL("Failed to create program!");
251 return false; 251 return false;
252 } 252 }
253 253
254 SkASSERT(kDrawPath_DrawType != type || !fCurrentProgram->hasVertexShader ()); 254 SkASSERT((kDrawPath_DrawType != type && kDrawPaths_DrawType != type)
255 || !fCurrentProgram->hasVertexShader());
255 256
256 fCurrentProgram.get()->ref(); 257 fCurrentProgram.get()->ref();
257 258
258 GrGLuint programID = fCurrentProgram->programID(); 259 GrGLuint programID = fCurrentProgram->programID();
259 if (fHWProgramID != programID) { 260 if (fHWProgramID != programID) {
260 GL_CALL(UseProgram(programID)); 261 GL_CALL(UseProgram(programID));
261 fHWProgramID = programID; 262 fHWProgramID = programID;
262 } 263 }
263 264
264 fCurrentProgram->overrideBlend(&srcCoeff, &dstCoeff); 265 fCurrentProgram->overrideBlend(&srcCoeff, &dstCoeff);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 GrGLAttribTypeToLayout(attribType).fCount, 379 GrGLAttribTypeToLayout(attribType).fCount,
379 GrGLAttribTypeToLayout(attribType).fType, 380 GrGLAttribTypeToLayout(attribType).fType,
380 GrGLAttribTypeToLayout(attribType).fNormalized, 381 GrGLAttribTypeToLayout(attribType).fNormalized,
381 stride, 382 stride,
382 reinterpret_cast<GrGLvoid*>( 383 reinterpret_cast<GrGLvoid*>(
383 vertexOffsetInBytes + vertexAttrib->fOffset)); 384 vertexOffsetInBytes + vertexAttrib->fOffset));
384 } 385 }
385 attribState->disableUnusedArrays(this, usedAttribArraysMask); 386 attribState->disableUnusedArrays(this, usedAttribArraysMask);
386 } 387 }
387 } 388 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698