| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "SkAtomics.h" | 8 #include "SkAtomics.h" |
| 9 #include "SkBitmapProcShader.h" | 9 #include "SkBitmapProcShader.h" |
| 10 #include "SkColorShader.h" | 10 #include "SkColorShader.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 return kColor_GradientType; | 328 return kColor_GradientType; |
| 329 } | 329 } |
| 330 | 330 |
| 331 #if SK_SUPPORT_GPU | 331 #if SK_SUPPORT_GPU |
| 332 | 332 |
| 333 #include "SkGr.h" | 333 #include "SkGr.h" |
| 334 #include "effects/GrConstColorProcessor.h" | 334 #include "effects/GrConstColorProcessor.h" |
| 335 const GrFragmentProcessor* SkColorShader::asFragmentProcessor(GrContext*, const
SkMatrix&, | 335 const GrFragmentProcessor* SkColorShader::asFragmentProcessor(GrContext*, const
SkMatrix&, |
| 336 const SkMatrix*, S
kFilterQuality, | 336 const SkMatrix*, S
kFilterQuality, |
| 337 GrProcessorDataMan
ager*) const { | 337 GrProcessorDataMan
ager*) const { |
| 338 GrColor color = SkColor2GrColor(fColor); | 338 GrColor color = SkColorToPremulGrColor(fColor); |
| 339 return GrConstColorProcessor::Create(color, GrConstColorProcessor::kModulate
A_InputMode); | 339 return GrConstColorProcessor::Create(color, GrConstColorProcessor::kModulate
A_InputMode); |
| 340 } | 340 } |
| 341 | 341 |
| 342 #endif | 342 #endif |
| 343 | 343 |
| 344 #ifndef SK_IGNORE_TO_STRING | 344 #ifndef SK_IGNORE_TO_STRING |
| 345 void SkColorShader::toString(SkString* str) const { | 345 void SkColorShader::toString(SkString* str) const { |
| 346 str->append("SkColorShader: ("); | 346 str->append("SkColorShader: ("); |
| 347 | 347 |
| 348 str->append("Color: "); | 348 str->append("Color: "); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 364 #include "SkEmptyShader.h" | 364 #include "SkEmptyShader.h" |
| 365 | 365 |
| 366 void SkEmptyShader::toString(SkString* str) const { | 366 void SkEmptyShader::toString(SkString* str) const { |
| 367 str->append("SkEmptyShader: ("); | 367 str->append("SkEmptyShader: ("); |
| 368 | 368 |
| 369 this->INHERITED::toString(str); | 369 this->INHERITED::toString(str); |
| 370 | 370 |
| 371 str->append(")"); | 371 str->append(")"); |
| 372 } | 372 } |
| 373 #endif | 373 #endif |
| OLD | NEW |