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

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

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
« src/gpu/gl/GrGpuGL.cpp ('K') | « 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 &coverageStages, 245 &coverageStages,
246 &desc); 246 &desc);
247 247
248 fCurrentProgram.reset(fProgramCache->getProgram(desc, 248 fCurrentProgram.reset(fProgramCache->getProgram(desc,
249 colorStages.begin(), 249 colorStages.begin(),
250 coverageStages.begin())) ; 250 coverageStages.begin())) ;
251 if (NULL == fCurrentProgram.get()) { 251 if (NULL == fCurrentProgram.get()) {
252 SkDEBUGFAIL("Failed to create program!"); 252 SkDEBUGFAIL("Failed to create program!");
253 return false; 253 return false;
254 } 254 }
255
256 SkASSERT(kFillPath_DrawType != type || !fCurrentProgram->hasVertexShader ());
257
255 fCurrentProgram.get()->ref(); 258 fCurrentProgram.get()->ref();
256 259
257 GrGLuint programID = fCurrentProgram->programID(); 260 GrGLuint programID = fCurrentProgram->programID();
258 if (fHWProgramID != programID) { 261 if (fHWProgramID != programID) {
259 GL_CALL(UseProgram(programID)); 262 GL_CALL(UseProgram(programID));
260 fHWProgramID = programID; 263 fHWProgramID = programID;
261 } 264 }
262 265
263 fCurrentProgram->overrideBlend(&srcCoeff, &dstCoeff); 266 fCurrentProgram->overrideBlend(&srcCoeff, &dstCoeff);
264 this->flushBlend(kDrawLines_DrawType == type, srcCoeff, dstCoeff); 267 this->flushBlend(kDrawLines_DrawType == type, srcCoeff, dstCoeff);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 GrGLAttribTypeToLayout(attribType).fType, 374 GrGLAttribTypeToLayout(attribType).fType,
372 GrGLAttribTypeToLayout(attribType).fNormalized, 375 GrGLAttribTypeToLayout(attribType).fNormalized,
373 stride, 376 stride,
374 reinterpret_cast<GrGLvoid*>( 377 reinterpret_cast<GrGLvoid*>(
375 vertexOffsetInBytes + vertexAttrib->fOffset)); 378 vertexOffsetInBytes + vertexAttrib->fOffset));
376 } 379 }
377 380
378 attribState->disableUnusedArrays(this, usedAttribArraysMask, false); 381 attribState->disableUnusedArrays(this, usedAttribArraysMask, false);
379 } 382 }
380 } 383 }
OLDNEW
« src/gpu/gl/GrGpuGL.cpp ('K') | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698