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

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

Issue 956293003: Win64 warning fix for GrTessellatingPathRenderer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | 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 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 "GrDefaultGeoProcFactory.h" 10 #include "GrDefaultGeoProcFactory.h"
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 polys = contours_to_polys(contours.get(), contourCnt, alloc); 1482 polys = contours_to_polys(contours.get(), contourCnt, alloc);
1483 SkAutoTUnref<const GrGeometryProcessor> gp( 1483 SkAutoTUnref<const GrGeometryProcessor> gp(
1484 GrDefaultGeoProcFactory::Create(flags, color, viewM, SkMatrix::I())); 1484 GrDefaultGeoProcFactory::Create(flags, color, viewM, SkMatrix::I()));
1485 int count = 0; 1485 int count = 0;
1486 for (Poly* poly = polys; poly; poly = poly->fNext) { 1486 for (Poly* poly = polys; poly; poly = poly->fNext) {
1487 if (apply_fill_type(fillType, poly->fWinding) && poly->fCount >= 3) { 1487 if (apply_fill_type(fillType, poly->fWinding) && poly->fCount >= 3) {
1488 count += (poly->fCount - 2) * (WIREFRAME ? 6 : 3); 1488 count += (poly->fCount - 2) * (WIREFRAME ? 6 : 3);
1489 } 1489 }
1490 } 1490 }
1491 1491
1492 int stride = gp->getVertexStride(); 1492 size_t stride = gp->getVertexStride();
1493 GrDrawTarget::AutoReleaseGeometry arg; 1493 GrDrawTarget::AutoReleaseGeometry arg;
1494 if (!arg.set(target, count, stride, 0)) { 1494 if (!arg.set(target, count, stride, 0)) {
1495 return false; 1495 return false;
1496 } 1496 }
1497 LOG("emitting %d verts\n", count); 1497 LOG("emitting %d verts\n", count);
1498 void* end = polys_to_triangles(polys, fillType, arg.vertices()); 1498 void* end = polys_to_triangles(polys, fillType, arg.vertices());
1499 int actualCount = (static_cast<char*>(end) - static_cast<char*>(arg.vertices ())) / stride; 1499 int actualCount = static_cast<int>((static_cast<char*>(end) - static_cast<ch ar*>(arg.vertices())) / stride);
1500 LOG("actual count: %d\n", actualCount); 1500 LOG("actual count: %d\n", actualCount);
1501 SkASSERT(actualCount <= count); 1501 SkASSERT(actualCount <= count);
1502 1502
1503 GrPrimitiveType primitiveType = WIREFRAME ? kLines_GrPrimitiveType 1503 GrPrimitiveType primitiveType = WIREFRAME ? kLines_GrPrimitiveType
1504 : kTriangles_GrPrimitiveType; 1504 : kTriangles_GrPrimitiveType;
1505 target->drawNonIndexed(pipelineBuilder, gp, primitiveType, 0, actualCount); 1505 target->drawNonIndexed(pipelineBuilder, gp, primitiveType, 0, actualCount);
1506 1506
1507 return true; 1507 return true;
1508 } 1508 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698