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

Side by Side Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 291803004: Fix build error for windows for Dashing CL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « 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 2014 Google Inc. 2 * Copyright 2014 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 "GrDashingEffect.h" 8 #include "GrDashingEffect.h"
9 9
10 #include "gl/GrGLEffect.h" 10 #include "gl/GrGLEffect.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 SkScalar temp = SkScalarDiv(totalLen, srcIntervalLen); 72 SkScalar temp = SkScalarDiv(totalLen, srcIntervalLen);
73 SkScalar numFullIntervals = SkScalarFloorToScalar(temp); 73 SkScalar numFullIntervals = SkScalarFloorToScalar(temp);
74 *endingInt = totalLen - numFullIntervals * srcIntervalLen + info.fPhase; 74 *endingInt = totalLen - numFullIntervals * srcIntervalLen + info.fPhase;
75 temp = SkScalarDiv(*endingInt, srcIntervalLen); 75 temp = SkScalarDiv(*endingInt, srcIntervalLen);
76 *endingInt = *endingInt - SkScalarFloorToScalar(temp) * srcIntervalLen; 76 *endingInt = *endingInt - SkScalarFloorToScalar(temp) * srcIntervalLen;
77 if (0 == *endingInt) { 77 if (0 == *endingInt) {
78 *endingInt = srcIntervalLen; 78 *endingInt = srcIntervalLen;
79 } 79 }
80 if (*endingInt > info.fIntervals[0]) { 80 if (*endingInt > info.fIntervals[0]) {
81 if (0 == info.fIntervals[0]) { 81 if (0 == info.fIntervals[0]) {
82 *endingInt -= 0.01; // make sure we capture the last zero size pnt ( used if has caps) 82 *endingInt -= 0.01f; // make sure we capture the last zero size pnt (used if has caps)
83 } 83 }
84 return *endingInt - info.fIntervals[0]; 84 return *endingInt - info.fIntervals[0];
85 } 85 }
86 return 0; 86 return 0;
87 } 87 }
88 88
89 89
90 bool GrDashingEffect::DrawDashLine(const SkPoint pts[2], const SkPaint& paint, S kGpuDevice* dev) { 90 bool GrDashingEffect::DrawDashLine(const SkPoint pts[2], const SkPaint& paint, S kGpuDevice* dev) {
91 GrContext* context = dev->context(); 91 GrContext* context = dev->context();
92 if (context->getRenderTarget()->isMultisampled()) { 92 if (context->getRenderTarget()->isMultisampled()) {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 effect = DashingLineEffect::Create(edgeType, info, m, strokeWidth); 488 effect = DashingLineEffect::Create(edgeType, info, m, strokeWidth);
489 return effect; 489 return effect;
490 } 490 }
491 491
492 ////////////////////////////////////////////////////////////////////////////// 492 //////////////////////////////////////////////////////////////////////////////
493 493
494 GrEffectRef* GrDashingEffect::Create(GrEffectEdgeType edgeType, const SkPathEffe ct::DashInfo& info, 494 GrEffectRef* GrDashingEffect::Create(GrEffectEdgeType edgeType, const SkPathEffe ct::DashInfo& info,
495 const SkMatrix& matrix, SkScalar strokeWidt h) { 495 const SkMatrix& matrix, SkScalar strokeWidt h) {
496 return DashingLineEffect::Create(edgeType, info, matrix, strokeWidth); 496 return DashingLineEffect::Create(edgeType, info, matrix, strokeWidth);
497 } 497 }
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