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

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

Issue 367643004: Implement NVPR on GLES (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-program-fragment
Patch Set: Created 6 years, 5 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
« 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 255
256 SkASSERT((kDrawPath_DrawType != type && kDrawPaths_DrawType != type)
257 || !fCurrentProgram->hasVertexShader());
258
259 fCurrentProgram.get()->ref(); 256 fCurrentProgram.get()->ref();
260 257
261 GrGLuint programID = fCurrentProgram->programID(); 258 GrGLuint programID = fCurrentProgram->programID();
262 if (fHWProgramID != programID) { 259 if (fHWProgramID != programID) {
263 GL_CALL(UseProgram(programID)); 260 GL_CALL(UseProgram(programID));
264 fHWProgramID = programID; 261 fHWProgramID = programID;
265 } 262 }
266 263
267 fCurrentProgram->overrideBlend(&srcCoeff, &dstCoeff); 264 fCurrentProgram->overrideBlend(&srcCoeff, &dstCoeff);
268 this->flushBlend(kDrawLines_DrawType == type, srcCoeff, dstCoeff); 265 this->flushBlend(kDrawLines_DrawType == type, srcCoeff, dstCoeff);
269 266
270 fCurrentProgram->setData(blendOpts, 267 fCurrentProgram->setData(type,
268 blendOpts,
271 colorStages.begin(), 269 colorStages.begin(),
272 coverageStages.begin(), 270 coverageStages.begin(),
273 dstCopy, 271 dstCopy,
274 &fSharedGLProgramState); 272 &fSharedGLProgramState);
275 } 273 }
276 this->flushStencil(type); 274 this->flushStencil(type);
277 this->flushScissor(); 275 this->flushScissor();
278 this->flushAAState(type); 276 this->flushAAState(type);
279 277
280 SkIRect* devRect = NULL; 278 SkIRect* devRect = NULL;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 GrGLAttribTypeToLayout(attribType).fCount, 359 GrGLAttribTypeToLayout(attribType).fCount,
362 GrGLAttribTypeToLayout(attribType).fType, 360 GrGLAttribTypeToLayout(attribType).fType,
363 GrGLAttribTypeToLayout(attribType).fNormalized, 361 GrGLAttribTypeToLayout(attribType).fNormalized,
364 stride, 362 stride,
365 reinterpret_cast<GrGLvoid*>( 363 reinterpret_cast<GrGLvoid*>(
366 vertexOffsetInBytes + vertexAttrib->fOffset)); 364 vertexOffsetInBytes + vertexAttrib->fOffset));
367 } 365 }
368 attribState->disableUnusedArrays(this, usedAttribArraysMask); 366 attribState->disableUnusedArrays(this, usedAttribArraysMask);
369 } 367 }
370 } 368 }
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