| 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 "SkAnimator.h" | 10 #include "SkAnimator.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 bool SkAnimator::onEvent(const SkEvent& evt) { | 402 bool SkAnimator::onEvent(const SkEvent& evt) { |
| 403 #ifdef SK_DEBUG | 403 #ifdef SK_DEBUG |
| 404 SkAnimator* root = fMaker->getRoot(); | 404 SkAnimator* root = fMaker->getRoot(); |
| 405 if (root == NULL) | 405 if (root == NULL) |
| 406 root = this; | 406 root = this; |
| 407 if (root->isTrackingEvents()) | 407 if (root->isTrackingEvents()) |
| 408 root->eventDone(evt); | 408 root->eventDone(evt); |
| 409 #endif | 409 #endif |
| 410 if (evt.isType(SK_EventType_OnEnd)) { | 410 if (evt.isType(SK_EventType_OnEnd)) { |
| 411 SkEventState eventState; | 411 SkEventState eventState; |
| 412 bool success = evt.findPtr("anim", (void**) &eventState.fDisplayable); | 412 SkDEBUGCODE(bool success =) evt.findPtr("anim", (void**) &eventState.fDi
splayable); |
| 413 SkASSERT(success); | 413 SkASSERT(success); |
| 414 success = evt.findS32("time", (int32_t*) &fMaker->fEnableTime); | 414 SkDEBUGCODE(success =) evt.findS32("time", (int32_t*) &fMaker->fEnableTi
me); |
| 415 SkASSERT(success); | 415 SkASSERT(success); |
| 416 fMaker->fAdjustedStart = fMaker->getAppTime() - fMaker->fEnableTime; | 416 fMaker->fAdjustedStart = fMaker->getAppTime() - fMaker->fEnableTime; |
| 417 fMaker->fEvents.doEvent(*fMaker, SkDisplayEvent::kOnEnd, &eventState); | 417 fMaker->fEvents.doEvent(*fMaker, SkDisplayEvent::kOnEnd, &eventState); |
| 418 fMaker->fAdjustedStart = 0; | 418 fMaker->fAdjustedStart = 0; |
| 419 goto inval; | 419 goto inval; |
| 420 } | 420 } |
| 421 if (evt.isType(SK_EventType_Delay)) { | 421 if (evt.isType(SK_EventType_Delay)) { |
| 422 fMaker->doDelayedEvent(); | 422 fMaker->doDelayedEvent(); |
| 423 goto inval; | 423 goto inval; |
| 424 } | 424 } |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 { | 693 { |
| 694 SkDebugf("SkAnimator: Running UnitTest for %s\n", gUnitTests[i].fTypeNam
e); | 694 SkDebugf("SkAnimator: Running UnitTest for %s\n", gUnitTests[i].fTypeNam
e); |
| 695 gUnitTests[i].fUnitTest(); | 695 gUnitTests[i].fUnitTest(); |
| 696 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName); | 696 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName); |
| 697 } | 697 } |
| 698 #endif | 698 #endif |
| 699 } | 699 } |
| 700 | 700 |
| 701 void SkAnimator::Term() { | 701 void SkAnimator::Term() { |
| 702 } | 702 } |
| OLD | NEW |