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

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

Issue 827973002: ViewMatrix uniform upload moved to GeometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-on-gp
Patch Set: feedback inc Created 5 years, 11 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/GrGLPathRendering.h ('k') | src/gpu/gl/GrGLProgram.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 2014 Google Inc. 2 * Copyright 2014 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 "gl/GrGLPathRendering.h" 8 #include "gl/GrGLPathRendering.h"
9 #include "gl/GrGLNameAllocator.h" 9 #include "gl/GrGLNameAllocator.h"
10 #include "gl/GrGLUtil.h" 10 #include "gl/GrGLUtil.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 if (components >= 3) { 332 if (components >= 3) {
333 coefficients[6] = SkScalarToFloat(matrix[SkMatrix::kMPersp0]); 333 coefficients[6] = SkScalarToFloat(matrix[SkMatrix::kMPersp0]);
334 coefficients[7] = SkScalarToFloat(matrix[SkMatrix::kMPersp1]); 334 coefficients[7] = SkScalarToFloat(matrix[SkMatrix::kMPersp1]);
335 coefficients[8] = SkScalarToFloat(matrix[SkMatrix::kMPersp2]); 335 coefficients[8] = SkScalarToFloat(matrix[SkMatrix::kMPersp2]);
336 } 336 }
337 337
338 GL_CALL(ProgramPathFragmentInputGen(program, location, genMode, components, coefficients)); 338 GL_CALL(ProgramPathFragmentInputGen(program, location, genMode, components, coefficients));
339 } 339 }
340 340
341 void GrGLPathRendering::setProjectionMatrix(const SkMatrix& matrix, 341 void GrGLPathRendering::setProjectionMatrix(const SkMatrix& matrix,
342 const SkISize& renderTargetSize, 342 const SkISize& renderTargetSize,
343 GrSurfaceOrigin renderTargetOrigin) { 343 GrSurfaceOrigin renderTargetOrigin) {
344 344
345 SkASSERT(fGpu->glCaps().pathRenderingSupport()); 345 SkASSERT(fGpu->glCaps().pathRenderingSupport());
346 346
347 if (renderTargetOrigin == fHWProjectionMatrixState.fRenderTargetOrigin && 347 if (renderTargetOrigin == fHWProjectionMatrixState.fRenderTargetOrigin &&
348 renderTargetSize == fHWProjectionMatrixState.fRenderTargetSize && 348 renderTargetSize == fHWProjectionMatrixState.fRenderTargetSize &&
349 matrix.cheapEqualTo(fHWProjectionMatrixState.fViewMatrix)) { 349 matrix.cheapEqualTo(fHWProjectionMatrixState.fViewMatrix)) {
350 return; 350 return;
351 } 351 }
352 352
353 fHWProjectionMatrixState.fViewMatrix = matrix; 353 fHWProjectionMatrixState.fViewMatrix = matrix;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 reference, mask, coverMode, transformType, 469 reference, mask, coverMode, transformType,
470 transformValues)); 470 transformValues));
471 return; 471 return;
472 } 472 }
473 473
474 GL_CALL(StencilStrokePathInstanced(numPaths, pathNameType, paths, pathBase, 474 GL_CALL(StencilStrokePathInstanced(numPaths, pathNameType, paths, pathBase,
475 reference, mask, transformType, transform Values)); 475 reference, mask, transformType, transform Values));
476 GL_CALL(CoverStrokePathInstanced(numPaths, pathNameType, paths, pathBase, 476 GL_CALL(CoverStrokePathInstanced(numPaths, pathNameType, paths, pathBase,
477 coverMode, transformType, transformValues)) ; 477 coverMode, transformType, transformValues)) ;
478 } 478 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698