OLD | NEW |
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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 GrGradientEffect(GrContext* ctx, | 335 GrGradientEffect(GrContext* ctx, |
336 const SkGradientShaderBase& shader, | 336 const SkGradientShaderBase& shader, |
337 const SkMatrix& matrix, | 337 const SkMatrix& matrix, |
338 SkShader::TileMode tileMode); | 338 SkShader::TileMode tileMode); |
339 | 339 |
340 virtual ~GrGradientEffect(); | 340 virtual ~GrGradientEffect(); |
341 | 341 |
342 bool useAtlas() const { return SkToBool(-1 != fRow); } | 342 bool useAtlas() const { return SkToBool(-1 != fRow); } |
343 SkScalar getYCoord() const { return fYCoord; }; | 343 SkScalar getYCoord() const { return fYCoord; }; |
344 | 344 |
345 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; | |
346 | |
347 SkGradientShaderBase::GpuColorType getColorType() const { return fColorType;
} | 345 SkGradientShaderBase::GpuColorType getColorType() const { return fColorType;
} |
348 | 346 |
349 enum PremulType { | 347 enum PremulType { |
350 kBeforeInterp_PremulType, | 348 kBeforeInterp_PremulType, |
351 kAfterInterp_PremulType, | 349 kAfterInterp_PremulType, |
352 }; | 350 }; |
353 | 351 |
354 PremulType getPremulType() const { return fPremulType; } | 352 PremulType getPremulType() const { return fPremulType; } |
355 | 353 |
356 const SkColor* getColors(int pos) const { | 354 const SkColor* getColors(int pos) const { |
(...skipping 12 matching lines...) Expand all Loading... |
369 passed to the gradient factory rather than the array. | 367 passed to the gradient factory rather than the array. |
370 */ | 368 */ |
371 static const int kMaxRandomGradientColors = 4; | 369 static const int kMaxRandomGradientColors = 4; |
372 static int RandomGradientParams(SkRandom* r, | 370 static int RandomGradientParams(SkRandom* r, |
373 SkColor colors[kMaxRandomGradientColors], | 371 SkColor colors[kMaxRandomGradientColors], |
374 SkScalar** stops, | 372 SkScalar** stops, |
375 SkShader::TileMode* tm); | 373 SkShader::TileMode* tm); |
376 | 374 |
377 virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE; | 375 virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE; |
378 | 376 |
| 377 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE; |
| 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; |
386 SkScalar fYCoord; | 386 SkScalar fYCoord; |
387 GrTextureStripAtlas* fAtlas; | 387 GrTextureStripAtlas* fAtlas; |
388 int fRow; | 388 int fRow; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |