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

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

Issue 372053003: Revert of Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref
Patch Set: Created 6 years, 5 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/gradients/SkLinearGradient.h ('k') | src/effects/gradients/SkRadialGradient.h » ('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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 *grColor = SkColor2GrColorJustAlpha(paint.getColor()); 572 *grColor = SkColor2GrColorJustAlpha(paint.getColor());
573 *grEffect = GrLinearGradient::Create(context, *this, matrix, fTileMode); 573 *grEffect = GrLinearGradient::Create(context, *this, matrix, fTileMode);
574 574
575 return true; 575 return true;
576 } 576 }
577 577
578 #else 578 #else
579 579
580 bool SkLinearGradient::asNewEffect(GrContext* context, const SkPaint& paint, 580 bool SkLinearGradient::asNewEffect(GrContext* context, const SkPaint& paint,
581 const SkMatrix* localMatrix, GrColor* grColor , 581 const SkMatrix* localMatrix, GrColor* grColor ,
582 GrEffect** grEffect) const { 582 GrEffectRef** grEffect) const {
583 SkDEBUGFAIL("Should not call in GPU-less build"); 583 SkDEBUGFAIL("Should not call in GPU-less build");
584 return false; 584 return false;
585 } 585 }
586 586
587 #endif 587 #endif
588 588
589 #ifndef SK_IGNORE_TO_STRING 589 #ifndef SK_IGNORE_TO_STRING
590 void SkLinearGradient::toString(SkString* str) const { 590 void SkLinearGradient::toString(SkString* str) const {
591 str->append("SkLinearGradient ("); 591 str->append("SkLinearGradient (");
592 592
593 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); 593 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY);
594 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); 594 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY);
595 595
596 this->INHERITED::toString(str); 596 this->INHERITED::toString(str);
597 597
598 str->append(")"); 598 str->append(")");
599 } 599 }
600 #endif 600 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkLinearGradient.h ('k') | src/effects/gradients/SkRadialGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698