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

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

Issue 1434313002: Make all GrFragmentProcessors GL independent. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 private: 481 private:
482 GrLinearGradient(GrContext* ctx, 482 GrLinearGradient(GrContext* ctx,
483 const SkLinearGradient& shader, 483 const SkLinearGradient& shader,
484 const SkMatrix& matrix, 484 const SkMatrix& matrix,
485 SkShader::TileMode tm) 485 SkShader::TileMode tm)
486 : INHERITED(ctx, shader, matrix, tm) { 486 : INHERITED(ctx, shader, matrix, tm) {
487 this->initClassID<GrLinearGradient>(); 487 this->initClassID<GrLinearGradient>();
488 } 488 }
489 489
490 GrGLFragmentProcessor* onCreateGLInstance() const override { 490 GrGLSLFragmentProcessor* onCreateGLInstance() const override {
491 return new GrGLLinearGradient(*this); 491 return new GrGLLinearGradient(*this);
492 } 492 }
493 493
494 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, 494 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
495 GrProcessorKeyBuilder* b) const override { 495 GrProcessorKeyBuilder* b) const override {
496 GrGLLinearGradient::GenKey(*this, caps, b); 496 GrGLLinearGradient::GenKey(*this, caps, b);
497 } 497 }
498 498
499 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 499 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
500 500
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 str->append("SkLinearGradient ("); 569 str->append("SkLinearGradient (");
570 570
571 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); 571 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY);
572 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); 572 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY);
573 573
574 this->INHERITED::toString(str); 574 this->INHERITED::toString(str);
575 575
576 str->append(")"); 576 str->append(")");
577 } 577 }
578 #endif 578 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698