| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2010 Google Inc. | 2  * Copyright 2010 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 | 8 | 
| 9 #include "SkGr.h" | 9 #include "SkGr.h" | 
| 10 #include "SkGrPriv.h" | 10 #include "SkGrPriv.h" | 
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 562     bool applyColorFilterToPaintColor = false; | 562     bool applyColorFilterToPaintColor = false; | 
| 563     if (shaderFP) { | 563     if (shaderFP) { | 
| 564         if (primColorMode) { | 564         if (primColorMode) { | 
| 565             // There is a blend between the primitive color and the shader color
     . The shader sees | 565             // There is a blend between the primitive color and the shader color
     . The shader sees | 
| 566             // the opaque paint color. The shader's output is blended using the 
     provided mode by | 566             // the opaque paint color. The shader's output is blended using the 
     provided mode by | 
| 567             // the primitive color. The blended color is then modulated by the p
     aint's alpha. | 567             // the primitive color. The blended color is then modulated by the p
     aint's alpha. | 
| 568 | 568 | 
| 569             // The geometry processor will insert the primitive color to start t
     he color chain, so | 569             // The geometry processor will insert the primitive color to start t
     he color chain, so | 
| 570             // the GrPaint color will be ignored. | 570             // the GrPaint color will be ignored. | 
| 571 | 571 | 
| 572             GrColor shaderInput = origColor.opaque().toGrColor(); | 572             GrColor4f shaderInput = origColor.opaque(); | 
| 573 |  | 
| 574             // SRGBTODO: Preserve 4f on this code path |  | 
| 575             shaderFP = GrFragmentProcessor::OverrideInput(shaderFP, shaderInput)
     ; | 573             shaderFP = GrFragmentProcessor::OverrideInput(shaderFP, shaderInput)
     ; | 
| 576             if (primitiveIsSrc) { | 574             if (primitiveIsSrc) { | 
| 577                 shaderFP = GrXfermodeFragmentProcessor::MakeFromDstProcessor(std
     ::move(shaderFP), | 575                 shaderFP = GrXfermodeFragmentProcessor::MakeFromDstProcessor(std
     ::move(shaderFP), | 
| 578                                                                              *pr
     imColorMode); | 576                                                                              *pr
     imColorMode); | 
| 579             } else { | 577             } else { | 
| 580                 shaderFP = GrXfermodeFragmentProcessor::MakeFromSrcProcessor(std
     ::move(shaderFP), | 578                 shaderFP = GrXfermodeFragmentProcessor::MakeFromSrcProcessor(std
     ::move(shaderFP), | 
| 581                                                                              *pr
     imColorMode); | 579                                                                              *pr
     imColorMode); | 
| 582             } | 580             } | 
| 583             // The above may return null if compose results in a pass through of
      the prim color. | 581             // The above may return null if compose results in a pass through of
      the prim color. | 
| 584             if (shaderFP) { | 582             if (shaderFP) { | 
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 772             SkErrorInternals::SetError( kInvalidPaint_SkError, | 770             SkErrorInternals::SetError( kInvalidPaint_SkError, | 
| 773                                         "Sorry, I don't understand the filtering
      " | 771                                         "Sorry, I don't understand the filtering
      " | 
| 774                                         "mode you asked for.  Falling back to " | 772                                         "mode you asked for.  Falling back to " | 
| 775                                         "MIPMaps."); | 773                                         "MIPMaps."); | 
| 776             textureFilterMode = GrTextureParams::kMipMap_FilterMode; | 774             textureFilterMode = GrTextureParams::kMipMap_FilterMode; | 
| 777             break; | 775             break; | 
| 778 | 776 | 
| 779     } | 777     } | 
| 780     return textureFilterMode; | 778     return textureFilterMode; | 
| 781 } | 779 } | 
| OLD | NEW | 
|---|