| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 /////////////////////////////////////////////////////////////////////////////// | 296 /////////////////////////////////////////////////////////////////////////////// |
| 297 | 297 |
| 298 #if SK_SUPPORT_GPU | 298 #if SK_SUPPORT_GPU |
| 299 | 299 |
| 300 #include "GrCoordTransform.h" | 300 #include "GrCoordTransform.h" |
| 301 #include "GrFragmentProcessor.h" | 301 #include "GrFragmentProcessor.h" |
| 302 #include "gl/GrGLProcessor.h" | 302 #include "gl/GrGLProcessor.h" |
| 303 | 303 |
| 304 class GrFragmentStage; | 304 class GrFragmentStage; |
| 305 class GrBackendProcessorFactory; | 305 class GrBackendProcessorFactory; |
| 306 class GrInvariantOutput; |
| 306 | 307 |
| 307 /* | 308 /* |
| 308 * The interpretation of the texture matrix depends on the sample mode. The | 309 * The interpretation of the texture matrix depends on the sample mode. The |
| 309 * texture matrix is applied both when the texture coordinates are explicit | 310 * texture matrix is applied both when the texture coordinates are explicit |
| 310 * and when vertex positions are used as texture coordinates. In the latter | 311 * and when vertex positions are used as texture coordinates. In the latter |
| 311 * case the texture matrix is applied to the pre-view-matrix position | 312 * case the texture matrix is applied to the pre-view-matrix position |
| 312 * values. | 313 * values. |
| 313 * | 314 * |
| 314 * Normal SampleMode | 315 * Normal SampleMode |
| 315 * The post-matrix texture coordinates are in normalize space with (0,0) at | 316 * The post-matrix texture coordinates are in normalize space with (0,0) at |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 passed to the gradient factory rather than the array. | 369 passed to the gradient factory rather than the array. |
| 369 */ | 370 */ |
| 370 static const int kMaxRandomGradientColors = 4; | 371 static const int kMaxRandomGradientColors = 4; |
| 371 static int RandomGradientParams(SkRandom* r, | 372 static int RandomGradientParams(SkRandom* r, |
| 372 SkColor colors[kMaxRandomGradientColors], | 373 SkColor colors[kMaxRandomGradientColors], |
| 373 SkScalar** stops, | 374 SkScalar** stops, |
| 374 SkShader::TileMode* tm); | 375 SkShader::TileMode* tm); |
| 375 | 376 |
| 376 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; | 377 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; |
| 377 | 378 |
| 378 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE; | 379 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE; |
| 379 | 380 |
| 380 const GrCoordTransform& getCoordTransform() const { return fCoordTransform;
} | 381 const GrCoordTransform& getCoordTransform() const { return fCoordTransform;
} |
| 381 | 382 |
| 382 private: | 383 private: |
| 383 static const GrCoordSet kCoordSet = kLocal_GrCoordSet; | 384 static const GrCoordSet kCoordSet = kLocal_GrCoordSet; |
| 384 | 385 |
| 385 GrCoordTransform fCoordTransform; | 386 GrCoordTransform fCoordTransform; |
| 386 GrTextureAccess fTextureAccess; | 387 GrTextureAccess fTextureAccess; |
| 387 SkScalar fYCoord; | 388 SkScalar fYCoord; |
| 388 GrTextureStripAtlas* fAtlas; | 389 GrTextureStripAtlas* fAtlas; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 GrGLProgramDataManager::UniformHandle fColorStartUni; | 468 GrGLProgramDataManager::UniformHandle fColorStartUni; |
| 468 GrGLProgramDataManager::UniformHandle fColorMidUni; | 469 GrGLProgramDataManager::UniformHandle fColorMidUni; |
| 469 GrGLProgramDataManager::UniformHandle fColorEndUni; | 470 GrGLProgramDataManager::UniformHandle fColorEndUni; |
| 470 | 471 |
| 471 typedef GrGLFragmentProcessor INHERITED; | 472 typedef GrGLFragmentProcessor INHERITED; |
| 472 }; | 473 }; |
| 473 | 474 |
| 474 #endif | 475 #endif |
| 475 | 476 |
| 476 #endif | 477 #endif |
| OLD | NEW |