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

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

Issue 1428543003: Create GLSL base class for ProgramDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add space Created 5 years, 1 month 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/GrGLProgram.h ('k') | src/gpu/gl/GrGLProgramDataManager.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 #include "GrGLProgram.h" 8 #include "GrGLProgram.h"
9 9
10 #include "GrAllocator.h" 10 #include "GrAllocator.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // set RT adjustment 128 // set RT adjustment
129 const GrRenderTarget* rt = pipeline.getRenderTarget(); 129 const GrRenderTarget* rt = pipeline.getRenderTarget();
130 SkISize size; 130 SkISize size;
131 size.set(rt->width(), rt->height()); 131 size.set(rt->width(), rt->height());
132 if (!primProc.isPathRendering()) { 132 if (!primProc.isPathRendering()) {
133 if (fRenderTargetState.fRenderTargetOrigin != rt->origin() || 133 if (fRenderTargetState.fRenderTargetOrigin != rt->origin() ||
134 fRenderTargetState.fRenderTargetSize != size) { 134 fRenderTargetState.fRenderTargetSize != size) {
135 fRenderTargetState.fRenderTargetSize = size; 135 fRenderTargetState.fRenderTargetSize = size;
136 fRenderTargetState.fRenderTargetOrigin = rt->origin(); 136 fRenderTargetState.fRenderTargetOrigin = rt->origin();
137 137
138 GrGLfloat rtAdjustmentVec[4]; 138 float rtAdjustmentVec[4];
139 fRenderTargetState.getRTAdjustmentVec(rtAdjustmentVec); 139 fRenderTargetState.getRTAdjustmentVec(rtAdjustmentVec);
140 fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, rtAdjustmentVec); 140 fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, rtAdjustmentVec);
141 } 141 }
142 } else { 142 } else {
143 SkASSERT(fGpu->glCaps().shaderCaps()->pathRenderingSupport()); 143 SkASSERT(fGpu->glCaps().shaderCaps()->pathRenderingSupport());
144 const GrPathProcessor& pathProc = primProc.cast<GrPathProcessor>(); 144 const GrPathProcessor& pathProc = primProc.cast<GrPathProcessor>();
145 fGpu->glPathRendering()->setProjectionMatrix(pathProc.viewMatrix(), 145 fGpu->glPathRendering()->setProjectionMatrix(pathProc.viewMatrix(),
146 size, rt->origin()); 146 size, rt->origin());
147 } 147 }
148 } 148 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.h ('k') | src/gpu/gl/GrGLProgramDataManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698