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

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

Issue 278983002: add localmatrix param to asNewEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 return NULL; 560 return NULL;
561 } 561 }
562 matrix.postConcat(inv); 562 matrix.postConcat(inv);
563 } 563 }
564 matrix.postConcat(fPtsToUnit); 564 matrix.postConcat(fPtsToUnit);
565 return GrLinearGradient::Create(context, *this, matrix, fTileMode); 565 return GrLinearGradient::Create(context, *this, matrix, fTileMode);
566 } 566 }
567 567
568 #else 568 #else
569 569
570 GrEffectRef* SkLinearGradient::asNewEffect(GrContext*, const SkPaint&) const { 570 GrEffectRef* SkLinearGradient::asNewEffect(GrContext*, const SkPaint&, const SkM atrix*) const {
571 SkDEBUGFAIL("Should not call in GPU-less build"); 571 SkDEBUGFAIL("Should not call in GPU-less build");
572 return NULL; 572 return NULL;
573 } 573 }
574 574
575 #endif 575 #endif
576 576
577 #ifndef SK_IGNORE_TO_STRING 577 #ifndef SK_IGNORE_TO_STRING
578 void SkLinearGradient::toString(SkString* str) const { 578 void SkLinearGradient::toString(SkString* str) const {
579 str->append("SkLinearGradient ("); 579 str->append("SkLinearGradient (");
580 580
581 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); 581 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY);
582 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); 582 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY);
583 583
584 this->INHERITED::toString(str); 584 this->INHERITED::toString(str);
585 585
586 str->append(")"); 586 str->append(")");
587 } 587 }
588 #endif 588 #endif
OLDNEW
« no previous file with comments | « no previous file | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698