OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkComposeShader.h" | 10 #include "SkComposeShader.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 if (fMode) { | 245 if (fMode) { |
246 str->append(" Xfermode: "); | 246 str->append(" Xfermode: "); |
247 fMode->toString(str); | 247 fMode->toString(str); |
248 } | 248 } |
249 | 249 |
250 this->INHERITED::toString(str); | 250 this->INHERITED::toString(str); |
251 | 251 |
252 str->append(")"); | 252 str->append(")"); |
253 } | 253 } |
254 #endif | 254 #endif |
| 255 |
| 256 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 257 |
| 258 SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode
* xfer) { |
| 259 if (!dst || !src) { |
| 260 return nullptr; |
| 261 } |
| 262 return new SkComposeShader(dst, src, xfer); |
| 263 } |
| 264 |
| 265 SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode
::Mode mode) { |
| 266 SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(mode)); |
| 267 return CreateComposeShader(dst, src, xfer); |
| 268 } |
OLD | NEW |