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

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

Issue 958433004: fix for msan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 10 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/GrBatchTarget.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 #include "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 drawInfo.setVertexCount(vertexOffset); 360 drawInfo.setVertexCount(vertexOffset);
361 if (isIndexed) { 361 if (isIndexed) {
362 drawInfo.setIndexBuffer(indexBuffer); 362 drawInfo.setIndexBuffer(indexBuffer);
363 drawInfo.setStartIndex(firstIndex); 363 drawInfo.setStartIndex(firstIndex);
364 drawInfo.setIndexCount(indexOffset); 364 drawInfo.setIndexCount(indexOffset);
365 } else { 365 } else {
366 drawInfo.setStartIndex(0); 366 drawInfo.setStartIndex(0);
367 drawInfo.setIndexCount(0); 367 drawInfo.setIndexCount(0);
368 } 368 }
369 batchTarget->draw(drawInfo); 369 batchTarget->draw(drawInfo);
370
371 // put back reserves
372 batchTarget->putBackIndices((size_t)(maxIndices - indexOffset));
373 batchTarget->putBackVertices((size_t)(maxVertices - vertexOffset), (size _t)vertexStride);
370 } 374 }
371 375
372 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 376 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
373 377
374 private: 378 private:
375 DefaultPathBatch(const Geometry& geometry, uint8_t coverage, const SkMatrix& viewMatrix, 379 DefaultPathBatch(const Geometry& geometry, uint8_t coverage, const SkMatrix& viewMatrix,
376 bool isHairline) { 380 bool isHairline) {
377 this->initClassID<DefaultPathBatch>(); 381 this->initClassID<DefaultPathBatch>();
378 fBatch.fCoverage = coverage; 382 fBatch.fCoverage = coverage;
379 fBatch.fIsHairline = isHairline; 383 fBatch.fIsHairline = isHairline;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 730
727 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, 731 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target,
728 GrPipelineBuilder* pipelineBuilder, 732 GrPipelineBuilder* pipelineBuilder,
729 const SkMatrix& viewMatrix, 733 const SkMatrix& viewMatrix,
730 const SkPath& path, 734 const SkPath& path,
731 const SkStrokeRec& stroke) { 735 const SkStrokeRec& stroke) {
732 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); 736 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType());
733 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); 737 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType());
734 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p ath, stroke, true); 738 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p ath, stroke, true);
735 } 739 }
OLDNEW
« no previous file with comments | « src/gpu/GrBatchTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698