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

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

Issue 356513003: Step towards variable length effect keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak comment 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
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 toggle = next_dither_toggle16(toggle); 439 toggle = next_dither_toggle16(toggle);
440 440
441 dstX += SK_Scalar1; 441 dstX += SK_Scalar1;
442 } while (--count != 0); 442 } while (--count != 0);
443 } 443 }
444 } 444 }
445 445
446 #if SK_SUPPORT_GPU 446 #if SK_SUPPORT_GPU
447 447
448 #include "GrTBackendEffectFactory.h" 448 #include "GrTBackendEffectFactory.h"
449 #include "gl/GrGLShaderBuilder.h"
449 #include "SkGr.h" 450 #include "SkGr.h"
450 451
451 ///////////////////////////////////////////////////////////////////// 452 /////////////////////////////////////////////////////////////////////
452 453
453 class GrGLLinearGradient : public GrGLGradientEffect { 454 class GrGLLinearGradient : public GrGLGradientEffect {
454 public: 455 public:
455 456
456 GrGLLinearGradient(const GrBackendEffectFactory& factory, const GrDrawEffect &) 457 GrGLLinearGradient(const GrBackendEffectFactory& factory, const GrDrawEffect &)
457 : INHERITED (factory) { } 458 : INHERITED (factory) { }
458 459
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 str->append("SkLinearGradient ("); 591 str->append("SkLinearGradient (");
591 592
592 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); 593 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY);
593 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); 594 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY);
594 595
595 this->INHERITED::toString(str); 596 this->INHERITED::toString(str);
596 597
597 str->append(")"); 598 str->append(")");
598 } 599 }
599 #endif 600 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698