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

Side by Side Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 654273002: Push isEqual/onIsEqual down from GrProcessor to subclasses. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 #ifndef SkGradientShaderPriv_DEFINED 8 #ifndef SkGradientShaderPriv_DEFINED
9 #define SkGradientShaderPriv_DEFINED 9 #define SkGradientShaderPriv_DEFINED
10 10
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 sized to be at least kMaxRandomGradientColors. stops is a pointer to an array of at least 365 sized to be at least kMaxRandomGradientColors. stops is a pointer to an array of at least
366 size kMaxRandomGradientColors. It may be updated to NULL, indicating tha t NULL should be 366 size kMaxRandomGradientColors. It may be updated to NULL, indicating tha t NULL should be
367 passed to the gradient factory rather than the array. 367 passed to the gradient factory rather than the array.
368 */ 368 */
369 static const int kMaxRandomGradientColors = 4; 369 static const int kMaxRandomGradientColors = 4;
370 static int RandomGradientParams(SkRandom* r, 370 static int RandomGradientParams(SkRandom* r,
371 SkColor colors[kMaxRandomGradientColors], 371 SkColor colors[kMaxRandomGradientColors],
372 SkScalar** stops, 372 SkScalar** stops,
373 SkShader::TileMode* tm); 373 SkShader::TileMode* tm);
374 374
375 virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE; 375 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
376 376
377 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE; 377 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE;
378 378
379 const GrCoordTransform& getCoordTransform() const { return fCoordTransform; } 379 const GrCoordTransform& getCoordTransform() const { return fCoordTransform; }
380 380
381 private: 381 private:
382 static const GrCoordSet kCoordSet = kLocal_GrCoordSet; 382 static const GrCoordSet kCoordSet = kLocal_GrCoordSet;
383 383
384 GrCoordTransform fCoordTransform; 384 GrCoordTransform fCoordTransform;
385 GrTextureAccess fTextureAccess; 385 GrTextureAccess fTextureAccess;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 GrGLProgramDataManager::UniformHandle fColorStartUni; 466 GrGLProgramDataManager::UniformHandle fColorStartUni;
467 GrGLProgramDataManager::UniformHandle fColorMidUni; 467 GrGLProgramDataManager::UniformHandle fColorMidUni;
468 GrGLProgramDataManager::UniformHandle fColorEndUni; 468 GrGLProgramDataManager::UniformHandle fColorEndUni;
469 469
470 typedef GrGLFragmentProcessor INHERITED; 470 typedef GrGLFragmentProcessor INHERITED;
471 }; 471 };
472 472
473 #endif 473 #endif
474 474
475 #endif 475 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698