| 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 | 8 |
| 9 #ifndef SkShader_DEFINED | 9 #ifndef SkShader_DEFINED |
| 10 #define SkShader_DEFINED | 10 #define SkShader_DEFINED |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 * | 359 * |
| 360 * These are bare pointers; the ownership and reference count are unchanged
. | 360 * These are bare pointers; the ownership and reference count are unchanged
. |
| 361 */ | 361 */ |
| 362 | 362 |
| 363 struct ComposeRec { | 363 struct ComposeRec { |
| 364 const SkShader* fShaderA; | 364 const SkShader* fShaderA; |
| 365 const SkShader* fShaderB; | 365 const SkShader* fShaderB; |
| 366 const SkXfermode* fMode; | 366 const SkXfermode* fMode; |
| 367 }; | 367 }; |
| 368 | 368 |
| 369 virtual bool asACompose(ComposeRec* rec) const { return false; } | 369 virtual bool asACompose(ComposeRec*) const { return false; } |
| 370 | 370 |
| 371 | 371 |
| 372 /** | 372 /** |
| 373 * Returns true if the shader subclass succeeds in creating an effect or if
none is required. | 373 * Returns true if the shader subclass succeeds in creating an effect or if
none is required. |
| 374 * False is returned if it fails or if there is not an implementation of th
is method in the | 374 * False is returned if it fails or if there is not an implementation of th
is method in the |
| 375 * shader subclass. | 375 * shader subclass. |
| 376 * | 376 * |
| 377 * On success an implementation of this method must inspect the SkPaint and
set paintColor to | 377 * On success an implementation of this method must inspect the SkPaint and
set paintColor to |
| 378 * the color the effect expects as its input color. If the SkShader wishes
to emit a solid | 378 * the color the effect expects as its input color. If the SkShader wishes
to emit a solid |
| 379 * color then it should set paintColor to that color and not create an effe
ct. Note that | 379 * color then it should set paintColor to that color and not create an effe
ct. Note that |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 // constructors. | 500 // constructors. |
| 501 SkMatrix fLocalMatrix; | 501 SkMatrix fLocalMatrix; |
| 502 | 502 |
| 503 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 503 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
| 504 friend class SkLocalMatrixShader; | 504 friend class SkLocalMatrixShader; |
| 505 | 505 |
| 506 typedef SkFlattenable INHERITED; | 506 typedef SkFlattenable INHERITED; |
| 507 }; | 507 }; |
| 508 | 508 |
| 509 #endif | 509 #endif |
| OLD | NEW |