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/GrGLProgram.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
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 "GrGLProgram.h" 8 #include "GrGLProgram.h"
9 9
10 #include "GrAllocator.h" 10 #include "GrAllocator.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 fDesc = desc; 45 fDesc = desc;
46 fProgramID = 0; 46 fProgramID = 0;
47 47
48 fDstCopyTexUnit = -1; 48 fDstCopyTexUnit = -1;
49 49
50 fColor = GrColor_ILLEGAL; 50 fColor = GrColor_ILLEGAL;
51 fColorFilterColor = GrColor_ILLEGAL; 51 fColorFilterColor = GrColor_ILLEGAL;
52 52
53 if (fDesc.getHeader().fHasVertexCode || 53 if (fDesc.getHeader().fHasVertexCode ||
54 !fGpu->glCaps().fixedFunctionSupport() || 54 !fGpu->glCaps().fixedFunctionSupport() ||
55 !fGpu->glCaps().pathStencilingSupport()) { 55 !fGpu->glCaps().pathRenderingSupport()) {
56 56
57 GrGLFullShaderBuilder fullBuilder(fGpu, fUniformManager, fDesc); 57 GrGLFullShaderBuilder fullBuilder(fGpu, fUniformManager, fDesc);
58 if (this->genProgram(&fullBuilder, colorStages, coverageStages)) { 58 if (this->genProgram(&fullBuilder, colorStages, coverageStages)) {
59 fUniformHandles.fViewMatrixUni = fullBuilder.getViewMatrixUniform(); 59 fUniformHandles.fViewMatrixUni = fullBuilder.getViewMatrixUniform();
60 fHasVertexShader = true; 60 fHasVertexShader = true;
61 } 61 }
62 } else { 62 } else {
63 GrGLFragmentOnlyShaderBuilder fragmentOnlyBuilder(fGpu, fUniformManager, fDesc); 63 GrGLFragmentOnlyShaderBuilder fragmentOnlyBuilder(fGpu, fUniformManager, fDesc);
64 if (this->genProgram(&fragmentOnlyBuilder, colorStages, coverageStages)) { 64 if (this->genProgram(&fragmentOnlyBuilder, colorStages, coverageStages)) {
65 fNumTexCoordSets = fragmentOnlyBuilder.getNumTexCoordSets(); 65 fNumTexCoordSets = fragmentOnlyBuilder.getNumTexCoordSets();
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 565
566 fMatrixState.fViewMatrix = drawState.getViewMatrix(); 566 fMatrixState.fViewMatrix = drawState.getViewMatrix();
567 fMatrixState.fRenderTargetSize = size; 567 fMatrixState.fRenderTargetSize = size;
568 fMatrixState.fRenderTargetOrigin = rt->origin(); 568 fMatrixState.fRenderTargetOrigin = rt->origin();
569 569
570 GrGLfloat viewMatrix[3 * 3]; 570 GrGLfloat viewMatrix[3 * 3];
571 fMatrixState.getGLMatrix<3>(viewMatrix); 571 fMatrixState.getGLMatrix<3>(viewMatrix);
572 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix); 572 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix);
573 } 573 }
574 } 574 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698