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/GrShape.cpp

Issue 2087393003: Fix Rob's nits from https://codereview.chromium.org/2085913003 (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: cleaner Created 4 years, 6 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 | tests/GrShapeTest.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 2016 Google Inc. 2 * Copyright 2016 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 "GrShape.h" 8 #include "GrShape.h"
9 9
10 GrShape& GrShape::operator=(const GrShape& that) { 10 GrShape& GrShape::operator=(const GrShape& that) {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 if (!fPath.get()->isLine(nullptr)) { 330 if (!fPath.get()->isLine(nullptr)) {
331 fPath.get()->close(); 331 fPath.get()->close();
332 fPath.get()->setIsVolatile(true); 332 fPath.get()->setIsVolatile(true);
333 } 333 }
334 } 334 }
335 if (!this->style().hasNonDashPathEffect()) { 335 if (!this->style().hasNonDashPathEffect()) {
336 if (this->style().strokeRec().getStyle() == SkStrokeRec::kStroke_Sty le || 336 if (this->style().strokeRec().getStyle() == SkStrokeRec::kStroke_Sty le ||
337 this->style().strokeRec().getStyle() == SkStrokeRec::kHairline_S tyle) { 337 this->style().strokeRec().getStyle() == SkStrokeRec::kHairline_S tyle) {
338 // Stroke styles don't differentiate between winding and even/od d. 338 // Stroke styles don't differentiate between winding and even/od d.
339 // Moreover, dashing ignores inverseness (skbug.com/5421) 339 // Moreover, dashing ignores inverseness (skbug.com/5421)
340 bool inverse = !this->fStyle.isDashed() && fPath.get()->isInvers eFillType(); 340 bool inverse = !this->style().isDashed() && fPath.get()->isInver seFillType();
341 if (inverse) { 341 if (inverse) {
342 fPath.get()->setFillType(kDefaultPathInverseFillType); 342 fPath.get()->setFillType(kDefaultPathInverseFillType);
343 } else { 343 } else {
344 fPath.get()->setFillType(kDefaultPathFillType); 344 fPath.get()->setFillType(kDefaultPathFillType);
345 } 345 }
346 } else if (fPath.get()->isConvex()) { 346 } else if (fPath.get()->isConvex()) {
347 // There is no distinction between even/odd and non-zero winding count for convex 347 // There is no distinction between even/odd and non-zero winding count for convex
348 // paths. 348 // paths.
349 if (fPath.get()->isInverseFillType()) { 349 if (fPath.get()->isInverseFillType()) {
350 fPath.get()->setFillType(kDefaultPathInverseFillType); 350 fPath.get()->setFillType(kDefaultPathInverseFillType);
(...skipping 13 matching lines...) Expand all
364 return; 364 return;
365 } 365 }
366 if (!this->style().hasPathEffect()) { 366 if (!this->style().hasPathEffect()) {
367 fRRectDir = kDefaultRRectDir; 367 fRRectDir = kDefaultRRectDir;
368 fRRectStart = kDefaultRRectStart; 368 fRRectStart = kDefaultRRectStart;
369 } else if (fStyle.isDashed()) { 369 } else if (fStyle.isDashed()) {
370 // Dashing ignores the inverseness (currently). skbug.com/5421 370 // Dashing ignores the inverseness (currently). skbug.com/5421
371 fRRectIsInverted = false; 371 fRRectIsInverted = false;
372 } 372 }
373 } 373 }
OLDNEW
« no previous file with comments | « no previous file | tests/GrShapeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698