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

Side by Side Diff: src/gpu/GrTessellatingPathRenderer.cpp

Issue 1229143007: Start to propagate constness of GrPipelineBuilder up the stack (Closed) Base URL: https://skia.googlesource.com/skia.git@const-fix
Patch Set: rebase Created 5 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
« no previous file with comments | « src/gpu/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrTest.cpp » ('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 2015 Google Inc. 2 * Copyright 2015 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 "GrTessellatingPathRenderer.h" 8 #include "GrTessellatingPathRenderer.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 1504
1505 SkIRect clipBoundsI; 1505 SkIRect clipBoundsI;
1506 pipelineBuilder->clip().getConservativeBounds(rt, &clipBoundsI); 1506 pipelineBuilder->clip().getConservativeBounds(rt, &clipBoundsI);
1507 SkRect clipBounds = SkRect::Make(clipBoundsI); 1507 SkRect clipBounds = SkRect::Make(clipBoundsI);
1508 SkMatrix vmi; 1508 SkMatrix vmi;
1509 if (!viewM.invert(&vmi)) { 1509 if (!viewM.invert(&vmi)) {
1510 return false; 1510 return false;
1511 } 1511 }
1512 vmi.mapRect(&clipBounds); 1512 vmi.mapRect(&clipBounds);
1513 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM , clipBounds)); 1513 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM , clipBounds));
1514 target->drawBatch(pipelineBuilder, batch); 1514 target->drawBatch(*pipelineBuilder, batch);
1515 1515
1516 return true; 1516 return true;
1517 } 1517 }
1518 1518
1519 //////////////////////////////////////////////////////////////////////////////// /////////////////// 1519 //////////////////////////////////////////////////////////////////////////////// ///////////////////
1520 1520
1521 #ifdef GR_TEST_UTILS 1521 #ifdef GR_TEST_UTILS
1522 1522
1523 BATCH_TEST_DEFINE(TesselatingPathBatch) { 1523 BATCH_TEST_DEFINE(TesselatingPathBatch) {
1524 GrColor color = GrRandomColor(random); 1524 GrColor color = GrRandomColor(random);
1525 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 1525 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
1526 SkPath path = GrTest::TestPath(random); 1526 SkPath path = GrTest::TestPath(random);
1527 SkRect clipBounds = GrTest::TestRect(random); 1527 SkRect clipBounds = GrTest::TestRect(random);
1528 SkMatrix vmi; 1528 SkMatrix vmi;
1529 bool result = viewMatrix.invert(&vmi); 1529 bool result = viewMatrix.invert(&vmi);
1530 if (!result) { 1530 if (!result) {
1531 SkFAIL("Cannot invert matrix\n"); 1531 SkFAIL("Cannot invert matrix\n");
1532 } 1532 }
1533 vmi.mapRect(&clipBounds); 1533 vmi.mapRect(&clipBounds);
1534 return TessellatingPathBatch::Create(color, path, viewMatrix, clipBounds); 1534 return TessellatingPathBatch::Create(color, path, viewMatrix, clipBounds);
1535 } 1535 }
1536 1536
1537 #endif 1537 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverPathRenderer.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698