| 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 #ifndef SkShader_DEFINED | 8 #ifndef SkShader_DEFINED |
| 9 #define SkShader_DEFINED | 9 #define SkShader_DEFINED |
| 10 | 10 |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 #endif | 397 #endif |
| 398 | 398 |
| 399 /** | 399 /** |
| 400 * Create a new compose shader, given shaders dst, src, and a combining xfe
rmode mode. | 400 * Create a new compose shader, given shaders dst, src, and a combining xfe
rmode mode. |
| 401 * The xfermode is called with the output of the two shaders, and its outpu
t is returned. | 401 * The xfermode is called with the output of the two shaders, and its outpu
t is returned. |
| 402 * If xfer is null, SkXfermode::kSrcOver_Mode is assumed. | 402 * If xfer is null, SkXfermode::kSrcOver_Mode is assumed. |
| 403 * | 403 * |
| 404 * The caller is responsible for managing its reference-count for the xfer
(if not null). | 404 * The caller is responsible for managing its reference-count for the xfer
(if not null). |
| 405 */ | 405 */ |
| 406 static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader
> src, | 406 static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader
> src, |
| 407 sk_sp<SkXfermode> xfer); |
| 408 #ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR |
| 409 static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader
> src, |
| 407 SkXfermode* xfer); | 410 SkXfermode* xfer); |
| 411 #endif |
| 408 | 412 |
| 409 /** Call this to create a new shader that will draw with the specified bitma
p. | 413 /** Call this to create a new shader that will draw with the specified bitma
p. |
| 410 * | 414 * |
| 411 * If the bitmap cannot be used (e.g. has no pixels, or its dimensions | 415 * If the bitmap cannot be used (e.g. has no pixels, or its dimensions |
| 412 * exceed implementation limits (currently at 64K - 1)) then SkEmptyShader | 416 * exceed implementation limits (currently at 64K - 1)) then SkEmptyShader |
| 413 * may be returned. | 417 * may be returned. |
| 414 * | 418 * |
| 415 * If the src is kA8_Config then that mask will be colorized using the colo
r on | 419 * If the src is kA8_Config then that mask will be colorized using the colo
r on |
| 416 * the paint. | 420 * the paint. |
| 417 * | 421 * |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 SkMatrix fLocalMatrix; | 489 SkMatrix fLocalMatrix; |
| 486 | 490 |
| 487 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 491 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
| 488 friend class SkLocalMatrixShader; | 492 friend class SkLocalMatrixShader; |
| 489 friend class SkBitmapProcShader; // for computeTotalInverse() | 493 friend class SkBitmapProcShader; // for computeTotalInverse() |
| 490 | 494 |
| 491 typedef SkFlattenable INHERITED; | 495 typedef SkFlattenable INHERITED; |
| 492 }; | 496 }; |
| 493 | 497 |
| 494 #endif | 498 #endif |
| OLD | NEW |