| Index: src/core/SkShader.cpp
|
| diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
|
| index 305cf06695376d83848c8a47ed2f3ba251e04375..abd0e9a0ca57bcd520bae0009798504b521dad82 100644
|
| --- a/src/core/SkShader.cpp
|
| +++ b/src/core/SkShader.cpp
|
| @@ -79,6 +79,18 @@ bool SkShader::computeTotalInverse(const ContextRec& rec, SkMatrix* totalInverse
|
| return m->invert(totalInverse);
|
| }
|
|
|
| +bool SkShader::asLuminanceColor(SkColor* colorPtr) const {
|
| + SkColor storage;
|
| + if (NULL == colorPtr) {
|
| + colorPtr = &storage;
|
| + }
|
| + if (this->onAsLuminanceColor(colorPtr)) {
|
| + *colorPtr = SkColorSetA(*colorPtr, 0xFF); // we only return opaque
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| SkShader::Context* SkShader::createContext(const ContextRec& rec, void* storage) const {
|
| if (!this->computeTotalInverse(rec, NULL)) {
|
| return NULL;
|
|
|