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

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

Issue 1124633003: Revert of Start on simplifying generateGeometry() overrides (Closed) Base URL: https://skia.googlesource.com/skia.git@ibcache
Patch Set: Created 5 years, 7 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/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrDashingEffect.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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 LOG("emitting %d verts\n", count); 1452 LOG("emitting %d verts\n", count);
1453 void* end = polys_to_triangles(polys, fillType, vertices); 1453 void* end = polys_to_triangles(polys, fillType, vertices);
1454 int actualCount = static_cast<int>( 1454 int actualCount = static_cast<int>(
1455 (static_cast<char*>(end) - static_cast<char*>(vertices)) / stride); 1455 (static_cast<char*>(end) - static_cast<char*>(vertices)) / stride);
1456 LOG("actual count: %d\n", actualCount); 1456 LOG("actual count: %d\n", actualCount);
1457 SkASSERT(actualCount <= count); 1457 SkASSERT(actualCount <= count);
1458 1458
1459 GrPrimitiveType primitiveType = WIREFRAME ? kLines_GrPrimitiveType 1459 GrPrimitiveType primitiveType = WIREFRAME ? kLines_GrPrimitiveType
1460 : kTriangles_GrPrimitiveType; 1460 : kTriangles_GrPrimitiveType;
1461 GrDrawTarget::DrawInfo drawInfo; 1461 GrDrawTarget::DrawInfo drawInfo;
1462 drawInfo.init(primitiveType, vertexBuffer, firstVertex, actualCount); 1462 drawInfo.setPrimitiveType(primitiveType);
1463 drawInfo.setVertexBuffer(vertexBuffer);
1464 drawInfo.setStartVertex(firstVertex);
1465 drawInfo.setVertexCount(actualCount);
1466 drawInfo.setStartIndex(0);
1467 drawInfo.setIndexCount(0);
1463 batchTarget->draw(drawInfo); 1468 batchTarget->draw(drawInfo);
1464 1469
1465 batchTarget->putBackVertices((size_t)(count - actualCount), stride); 1470 batchTarget->putBackVertices((size_t)(count - actualCount), stride);
1466 return; 1471 return;
1467 } 1472 }
1468 1473
1469 bool onCombineIfPossible(GrBatch*) override { 1474 bool onCombineIfPossible(GrBatch*) override {
1470 return false; 1475 return false;
1471 } 1476 }
1472 1477
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 SkMatrix vmi; 1516 SkMatrix vmi;
1512 if (!viewM.invert(&vmi)) { 1517 if (!viewM.invert(&vmi)) {
1513 return false; 1518 return false;
1514 } 1519 }
1515 vmi.mapRect(&clipBounds); 1520 vmi.mapRect(&clipBounds);
1516 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM , clipBounds)); 1521 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM , clipBounds));
1517 target->drawBatch(pipelineBuilder, batch); 1522 target->drawBatch(pipelineBuilder, batch);
1518 1523
1519 return true; 1524 return true;
1520 } 1525 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698