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

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

Issue 299943002: separate view matrix from rt adjustment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase on tot: Created 6 years, 6 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/GrGLShaderBuilder.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 8
9 #include "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 renderTargetSize == fHWProjectionMatrixState.fRenderTargetSize && 2226 renderTargetSize == fHWProjectionMatrixState.fRenderTargetSize &&
2227 matrix.cheapEqualTo(fHWProjectionMatrixState.fViewMatrix)) { 2227 matrix.cheapEqualTo(fHWProjectionMatrixState.fViewMatrix)) {
2228 return; 2228 return;
2229 } 2229 }
2230 2230
2231 fHWProjectionMatrixState.fViewMatrix = matrix; 2231 fHWProjectionMatrixState.fViewMatrix = matrix;
2232 fHWProjectionMatrixState.fRenderTargetSize = renderTargetSize; 2232 fHWProjectionMatrixState.fRenderTargetSize = renderTargetSize;
2233 fHWProjectionMatrixState.fRenderTargetOrigin = renderTargetOrigin; 2233 fHWProjectionMatrixState.fRenderTargetOrigin = renderTargetOrigin;
2234 2234
2235 GrGLfloat glMatrix[4 * 4]; 2235 GrGLfloat glMatrix[4 * 4];
2236 fHWProjectionMatrixState.getGLMatrix<4>(glMatrix); 2236 fHWProjectionMatrixState.getRTAdjustedGLMatrix<4>(glMatrix);
2237 GL_CALL(MatrixLoadf(GR_GL_PROJECTION, glMatrix)); 2237 GL_CALL(MatrixLoadf(GR_GL_PROJECTION, glMatrix));
2238 } 2238 }
2239 2239
2240 void GrGpuGL::enablePathTexGen(int unitIdx, 2240 void GrGpuGL::enablePathTexGen(int unitIdx,
2241 PathTexGenComponents components, 2241 PathTexGenComponents components,
2242 const GrGLfloat* coefficients) { 2242 const GrGLfloat* coefficients) {
2243 SkASSERT(this->glCaps().pathRenderingSupport()); 2243 SkASSERT(this->glCaps().pathRenderingSupport());
2244 SkASSERT(components >= kS_PathTexGenComponents && 2244 SkASSERT(components >= kS_PathTexGenComponents &&
2245 components <= kSTR_PathTexGenComponents); 2245 components <= kSTR_PathTexGenComponents);
2246 SkASSERT(this->glCaps().maxFixedFunctionTextureCoords() >= unitIdx); 2246 SkASSERT(this->glCaps().maxFixedFunctionTextureCoords() >= unitIdx);
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 this->setVertexArrayID(gpu, 0); 2803 this->setVertexArrayID(gpu, 0);
2804 } 2804 }
2805 int attrCount = gpu->glCaps().maxVertexAttributes(); 2805 int attrCount = gpu->glCaps().maxVertexAttributes();
2806 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2806 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2807 fDefaultVertexArrayAttribState.resize(attrCount); 2807 fDefaultVertexArrayAttribState.resize(attrCount);
2808 } 2808 }
2809 attribState = &fDefaultVertexArrayAttribState; 2809 attribState = &fDefaultVertexArrayAttribState;
2810 } 2810 }
2811 return attribState; 2811 return attribState;
2812 } 2812 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698