| 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 "SkDrawExtraPathEffect.h" | 10 #include "SkDrawExtraPathEffect.h" |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 if (effect1 == NULL) | 364 if (effect1 == NULL) |
| 365 effect1 = (SkDrawPathEffect*) child; | 365 effect1 = (SkDrawPathEffect*) child; |
| 366 else | 366 else |
| 367 effect2 = (SkDrawPathEffect*) child; | 367 effect2 = (SkDrawPathEffect*) child; |
| 368 return true; | 368 return true; |
| 369 } | 369 } |
| 370 | 370 |
| 371 SkPathEffect* SkDrawComposePathEffect::getPathEffect() { | 371 SkPathEffect* SkDrawComposePathEffect::getPathEffect() { |
| 372 SkPathEffect* e1 = effect1->getPathEffect(); | 372 SkPathEffect* e1 = effect1->getPathEffect(); |
| 373 SkPathEffect* e2 = effect2->getPathEffect(); | 373 SkPathEffect* e2 = effect2->getPathEffect(); |
| 374 SkPathEffect* composite = new SkComposePathEffect(e1, e2); | 374 SkPathEffect* composite = SkComposePathEffect::Create(e1, e2); |
| 375 e1->unref(); | 375 e1->unref(); |
| 376 e2->unref(); | 376 e2->unref(); |
| 377 return composite; | 377 return composite; |
| 378 } | 378 } |
| 379 | 379 |
| 380 bool SkDrawComposePathEffect::isPaint() const { | 380 bool SkDrawComposePathEffect::isPaint() const { |
| 381 return true; | 381 return true; |
| 382 } | 382 } |
| 383 | 383 |
| 384 //////////// SkDrawCornerPathEffect | 384 //////////// SkDrawCornerPathEffect |
| 385 | 385 |
| 386 #if SK_USE_CONDENSED_INFO == 0 | 386 #if SK_USE_CONDENSED_INFO == 0 |
| 387 | 387 |
| 388 const SkMemberInfo SkDrawCornerPathEffect::fInfo[] = { | 388 const SkMemberInfo SkDrawCornerPathEffect::fInfo[] = { |
| 389 SK_MEMBER(radius, Float) | 389 SK_MEMBER(radius, Float) |
| 390 }; | 390 }; |
| 391 | 391 |
| 392 #endif | 392 #endif |
| 393 | 393 |
| 394 DEFINE_GET_MEMBER(SkDrawCornerPathEffect); | 394 DEFINE_GET_MEMBER(SkDrawCornerPathEffect); |
| 395 | 395 |
| 396 SkDrawCornerPathEffect::SkDrawCornerPathEffect(SkDisplayTypes type): | 396 SkDrawCornerPathEffect::SkDrawCornerPathEffect(SkDisplayTypes type): |
| 397 fType(type), radius(0) { | 397 fType(type), radius(0) { |
| 398 } | 398 } |
| 399 | 399 |
| 400 SkDrawCornerPathEffect::~SkDrawCornerPathEffect() { | 400 SkDrawCornerPathEffect::~SkDrawCornerPathEffect() { |
| 401 } | 401 } |
| 402 | 402 |
| 403 SkPathEffect* SkDrawCornerPathEffect::getPathEffect() { | 403 SkPathEffect* SkDrawCornerPathEffect::getPathEffect() { |
| 404 return new SkCornerPathEffect(radius); | 404 return SkCornerPathEffect::Create(radius); |
| 405 } | 405 } |
| 406 | 406 |
| 407 ///////// | 407 ///////// |
| 408 | 408 |
| 409 #include "SkExtras.h" | 409 #include "SkExtras.h" |
| 410 | 410 |
| 411 const char kDrawShape1DPathEffectName[] = "pathEffect:shape1D"; | 411 const char kDrawShape1DPathEffectName[] = "pathEffect:shape1D"; |
| 412 const char kDrawShape2DPathEffectName[] = "pathEffect:shape2D"; | 412 const char kDrawShape2DPathEffectName[] = "pathEffect:shape2D"; |
| 413 const char kDrawComposePathEffectName[] = "pathEffect:compose"; | 413 const char kDrawComposePathEffectName[] = "pathEffect:compose"; |
| 414 const char kDrawCornerPathEffectName[] = "pathEffect:corner"; | 414 const char kDrawCornerPathEffectName[] = "pathEffect:corner"; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 506 |
| 507 void InitializeSkExtraPathEffects(SkAnimator* animator) { | 507 void InitializeSkExtraPathEffects(SkAnimator* animator) { |
| 508 animator->addExtras(new SkExtraPathEffects()); | 508 animator->addExtras(new SkExtraPathEffects()); |
| 509 } | 509 } |
| 510 | 510 |
| 511 //////////////// | 511 //////////////// |
| 512 | 512 |
| 513 | 513 |
| 514 SkExtras::SkExtras() : fExtraCallBack(NULL), fExtraStorage(NULL) { | 514 SkExtras::SkExtras() : fExtraCallBack(NULL), fExtraStorage(NULL) { |
| 515 } | 515 } |
| OLD | NEW |