OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 animationId = m_animationIdMap.get(animationName); | 993 animationId = m_animationIdMap.get(animationName); |
994 | 994 |
995 OwnPtr<WebAnimation> toAdd(createWebAnimation(values, animation, animationId
, timeOffset, boxSize)); | 995 OwnPtr<WebAnimation> toAdd(createWebAnimation(values, animation, animationId
, timeOffset, boxSize)); |
996 | 996 |
997 if (toAdd) { | 997 if (toAdd) { |
998 animationId = toAdd->id(); | 998 animationId = toAdd->id(); |
999 m_animationIdMap.set(animationName, animationId); | 999 m_animationIdMap.set(animationName, animationId); |
1000 | 1000 |
1001 // Remove any existing animations with the same animation id and target
property. | 1001 // Remove any existing animations with the same animation id and target
property. |
1002 platformLayer()->removeAnimation(animationId, toAdd->targetProperty()); | 1002 platformLayer()->removeAnimation(animationId, toAdd->targetProperty()); |
1003 return platformLayer()->addAnimation(toAdd.get()); | 1003 return platformLayer()->addAnimation(toAdd.release()); |
1004 } | 1004 } |
1005 | 1005 |
1006 return false; | 1006 return false; |
1007 } | 1007 } |
1008 | 1008 |
1009 void GraphicsLayer::pauseAnimation(const String& animationName, double timeOffse
t) | 1009 void GraphicsLayer::pauseAnimation(const String& animationName, double timeOffse
t) |
1010 { | 1010 { |
1011 if (m_animationIdMap.contains(animationName)) | 1011 if (m_animationIdMap.contains(animationName)) |
1012 platformLayer()->pauseAnimation(m_animationIdMap.get(animationName), tim
eOffset); | 1012 platformLayer()->pauseAnimation(m_animationIdMap.get(animationName), tim
eOffset); |
1013 } | 1013 } |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 #ifndef NDEBUG | 1211 #ifndef NDEBUG |
1212 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1212 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1213 { | 1213 { |
1214 if (!layer) | 1214 if (!layer) |
1215 return; | 1215 return; |
1216 | 1216 |
1217 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1217 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
1218 fprintf(stderr, "%s\n", output.utf8().data()); | 1218 fprintf(stderr, "%s\n", output.utf8().data()); |
1219 } | 1219 } |
1220 #endif | 1220 #endif |
OLD | NEW |