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

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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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
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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 t.append(builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0)); 572 t.append(builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0));
573 t.append(")"); 573 t.append(")");
574 this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, sample rs); 574 this->emitColor(builder, t.c_str(), baseKey, outputColor, inputColor, sample rs);
575 } 575 }
576 576
577 ///////////////////////////////////////////////////////////////////// 577 /////////////////////////////////////////////////////////////////////
578 578
579 bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint, 579 bool SkRadialGradient::asNewEffect(GrContext* context, const SkPaint& paint,
580 const SkMatrix* localMatrix, GrColor* paintCo lor, 580 const SkMatrix* localMatrix, GrColor* paintCo lor,
581 GrEffect** effect) const { 581 GrEffect** effect) const {
582 SkASSERT(NULL != context); 582 SkASSERT(context);
583 583
584 SkMatrix matrix; 584 SkMatrix matrix;
585 if (!this->getLocalMatrix().invert(&matrix)) { 585 if (!this->getLocalMatrix().invert(&matrix)) {
586 return false; 586 return false;
587 } 587 }
588 if (localMatrix) { 588 if (localMatrix) {
589 SkMatrix inv; 589 SkMatrix inv;
590 if (!localMatrix->invert(&inv)) { 590 if (!localMatrix->invert(&inv)) {
591 return false; 591 return false;
592 } 592 }
(...skipping 28 matching lines...) Expand all
621 str->appendScalar(fCenter.fY); 621 str->appendScalar(fCenter.fY);
622 str->append(") radius: "); 622 str->append(") radius: ");
623 str->appendScalar(fRadius); 623 str->appendScalar(fRadius);
624 str->append(" "); 624 str->append(" ");
625 625
626 this->INHERITED::toString(str); 626 this->INHERITED::toString(str);
627 627
628 str->append(")"); 628 str->append(")");
629 } 629 }
630 #endif 630 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698