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

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

Issue 377503004: Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref
Patch Set: Update YUV effect to reflect these changes. 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/SkRadialGradient.h ('k') | src/effects/gradients/SkSweepGradient.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkRadialGradient.h" 9 #include "SkRadialGradient.h"
10 #include "SkRadialGradient_Table.h" 10 #include "SkRadialGradient_Table.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 *grColor = SkColor2GrColorJustAlpha(paint.getColor()); 584 *grColor = SkColor2GrColorJustAlpha(paint.getColor());
585 *grEffect = GrRadialGradient::Create(context, *this, matrix, fTileMode); 585 *grEffect = GrRadialGradient::Create(context, *this, matrix, fTileMode);
586 586
587 return true; 587 return true;
588 } 588 }
589 589
590 #else 590 #else
591 591
592 bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint, 592 bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint,
593 const SkMatrix* localMatrix, GrColor* grColor , 593 const SkMatrix* localMatrix, GrColor* grColor ,
594 GrEffectRef** grEffect) const { 594 GrEffect** grEffect) const {
595 SkDEBUGFAIL("Should not call in GPU-less build"); 595 SkDEBUGFAIL("Should not call in GPU-less build");
596 return false; 596 return false;
597 } 597 }
598 598
599 #endif 599 #endif
600 600
601 #ifndef SK_IGNORE_TO_STRING 601 #ifndef SK_IGNORE_TO_STRING
602 void SkRadialGradient::toString(SkString* str) const { 602 void SkRadialGradient::toString(SkString* str) const {
603 str->append("SkRadialGradient: ("); 603 str->append("SkRadialGradient: (");
604 604
605 str->append("center: ("); 605 str->append("center: (");
606 str->appendScalar(fCenter.fX); 606 str->appendScalar(fCenter.fX);
607 str->append(", "); 607 str->append(", ");
608 str->appendScalar(fCenter.fY); 608 str->appendScalar(fCenter.fY);
609 str->append(") radius: "); 609 str->append(") radius: ");
610 str->appendScalar(fRadius); 610 str->appendScalar(fRadius);
611 str->append(" "); 611 str->append(" ");
612 612
613 this->INHERITED::toString(str); 613 this->INHERITED::toString(str);
614 614
615 str->append(")"); 615 str->append(")");
616 } 616 }
617 #endif 617 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkRadialGradient.h ('k') | src/effects/gradients/SkSweepGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698