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

Side by Side Diff: src/effects/gradients/SkLinearGradient.cpp

Issue 1348583002: Make skpaint->grpaint flow work for composing draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused inheriteds to satisfy clang Created 5 years, 2 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/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkRadialGradient.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 2012 Google Inc. 2 * Copyright 2012 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 "SkLinearGradient.h" 8 #include "SkLinearGradient.h"
9 9
10 static inline int repeat_bits(int x, const int bits) { 10 static inline int repeat_bits(int x, const int bits) {
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 SkMatrix inv; 554 SkMatrix inv;
555 if (!localMatrix->invert(&inv)) { 555 if (!localMatrix->invert(&inv)) {
556 return nullptr; 556 return nullptr;
557 } 557 }
558 matrix.postConcat(inv); 558 matrix.postConcat(inv);
559 } 559 }
560 matrix.postConcat(fPtsToUnit); 560 matrix.postConcat(fPtsToUnit);
561 561
562 SkAutoTUnref<const GrFragmentProcessor> inner( 562 SkAutoTUnref<const GrFragmentProcessor> inner(
563 GrLinearGradient::Create(context, procDataManager, *this, matrix, fTileM ode)); 563 GrLinearGradient::Create(context, procDataManager, *this, matrix, fTileM ode));
564 return GrFragmentProcessor::MulOuputByInputAlpha(inner); 564 return GrFragmentProcessor::MulOutputByInputAlpha(inner);
565 } 565 }
566 566
567 567
568 #endif 568 #endif
569 569
570 #ifndef SK_IGNORE_TO_STRING 570 #ifndef SK_IGNORE_TO_STRING
571 void SkLinearGradient::toString(SkString* str) const { 571 void SkLinearGradient::toString(SkString* str) const {
572 str->append("SkLinearGradient ("); 572 str->append("SkLinearGradient (");
573 573
574 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); 574 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY);
575 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); 575 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY);
576 576
577 this->INHERITED::toString(str); 577 this->INHERITED::toString(str);
578 578
579 str->append(")"); 579 str->append(")");
580 } 580 }
581 #endif 581 #endif
OLDNEW
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698