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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 void GraphicsLayer::setContentsToCanvas(WebLayer* layer) | 1087 void GraphicsLayer::setContentsToCanvas(WebLayer* layer) |
1088 { | 1088 { |
1089 setContentsTo(ContentsLayerForCanvas, layer); | 1089 setContentsTo(ContentsLayerForCanvas, layer); |
1090 } | 1090 } |
1091 | 1091 |
1092 void GraphicsLayer::setContentsToMedia(WebLayer* layer) | 1092 void GraphicsLayer::setContentsToMedia(WebLayer* layer) |
1093 { | 1093 { |
1094 setContentsTo(ContentsLayerForVideo, layer); | 1094 setContentsTo(ContentsLayerForVideo, layer); |
1095 } | 1095 } |
1096 | 1096 |
1097 bool GraphicsLayer::addAnimation(const KeyframeValueList& values, const IntSize&
boxSize, const CSSAnimationData* animation, const String& animationName, double
timeOffset) | 1097 bool GraphicsLayer::addAnimation(const KeyframeValueList& values, const IntSize&
boxSize, const CSSAnimationData* animation, const String& animationName, double
timeOffset, RenderView* renderView) |
1098 { | 1098 { |
1099 platformLayer()->setAnimationDelegate(this); | 1099 platformLayer()->setAnimationDelegate(this); |
1100 | 1100 |
1101 int animationId = 0; | 1101 int animationId = 0; |
1102 | 1102 |
1103 if (m_animationIdMap.contains(animationName)) | 1103 if (m_animationIdMap.contains(animationName)) |
1104 animationId = m_animationIdMap.get(animationName); | 1104 animationId = m_animationIdMap.get(animationName); |
1105 | 1105 |
1106 OwnPtr<WebAnimation> toAdd(createWebAnimation(values, animation, animationId
, timeOffset, boxSize)); | 1106 OwnPtr<WebAnimation> toAdd(createWebAnimation(values, animation, animationId
, timeOffset, boxSize, renderView)); |
1107 | 1107 |
1108 if (toAdd) { | 1108 if (toAdd) { |
1109 animationId = toAdd->id(); | 1109 animationId = toAdd->id(); |
1110 m_animationIdMap.set(animationName, animationId); | 1110 m_animationIdMap.set(animationName, animationId); |
1111 | 1111 |
1112 // Remove any existing animations with the same animation id and target
property. | 1112 // Remove any existing animations with the same animation id and target
property. |
1113 platformLayer()->removeAnimation(animationId, toAdd->targetProperty()); | 1113 platformLayer()->removeAnimation(animationId, toAdd->targetProperty()); |
1114 return platformLayer()->addAnimation(toAdd.get()); | 1114 return platformLayer()->addAnimation(toAdd.get()); |
1115 } | 1115 } |
1116 | 1116 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 #ifndef NDEBUG | 1312 #ifndef NDEBUG |
1313 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1313 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1314 { | 1314 { |
1315 if (!layer) | 1315 if (!layer) |
1316 return; | 1316 return; |
1317 | 1317 |
1318 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1318 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
1319 fprintf(stderr, "%s\n", output.utf8().data()); | 1319 fprintf(stderr, "%s\n", output.utf8().data()); |
1320 } | 1320 } |
1321 #endif | 1321 #endif |
OLD | NEW |