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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 paintGraphicsLayerContents(context, clip); | 1078 paintGraphicsLayerContents(context, clip); |
1079 } | 1079 } |
1080 | 1080 |
1081 | 1081 |
1082 void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group) | 1082 void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group) |
1083 { | 1083 { |
1084 if (m_client) | 1084 if (m_client) |
1085 m_client->notifyAnimationStarted(this, monotonicTime, group); | 1085 m_client->notifyAnimationStarted(this, monotonicTime, group); |
1086 } | 1086 } |
1087 | 1087 |
1088 void GraphicsLayer::notifyAnimationFinished(double, int) | 1088 void GraphicsLayer::notifyAnimationFinished(double, int group) |
1089 { | 1089 { |
| 1090 if (m_scrollableArea) |
| 1091 m_scrollableArea->notifyCompositorAnimationFinished(group); |
1090 } | 1092 } |
1091 | 1093 |
1092 void GraphicsLayer::didScroll() | 1094 void GraphicsLayer::didScroll() |
1093 { | 1095 { |
1094 if (m_scrollableArea) { | 1096 if (m_scrollableArea) { |
1095 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to
DoubleSize(m_layer->layer()->scrollPositionDouble()); | 1097 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to
DoubleSize(m_layer->layer()->scrollPositionDouble()); |
| 1098 bool cancelProgrammaticAnimations = false; |
1096 // FIXME: Remove the toFloatPoint(). crbug.com/414283. | 1099 // FIXME: Remove the toFloatPoint(). crbug.com/414283. |
1097 m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPositio
n)); | 1100 m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPositio
n), cancelProgrammaticAnimations); |
1098 } | 1101 } |
1099 } | 1102 } |
1100 | 1103 |
1101 DisplayItemList* GraphicsLayer::displayItemList() | 1104 DisplayItemList* GraphicsLayer::displayItemList() |
1102 { | 1105 { |
1103 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) | 1106 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) |
1104 return 0; | 1107 return 0; |
1105 if (!m_displayItemList) | 1108 if (!m_displayItemList) |
1106 m_displayItemList = DisplayItemList::create(); | 1109 m_displayItemList = DisplayItemList::create(); |
1107 return m_displayItemList.get(); | 1110 return m_displayItemList.get(); |
1108 } | 1111 } |
1109 | 1112 |
1110 } // namespace blink | 1113 } // namespace blink |
1111 | 1114 |
1112 #ifndef NDEBUG | 1115 #ifndef NDEBUG |
1113 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1116 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
1114 { | 1117 { |
1115 if (!layer) | 1118 if (!layer) |
1116 return; | 1119 return; |
1117 | 1120 |
1118 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1121 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1119 fprintf(stderr, "%s\n", output.utf8().data()); | 1122 fprintf(stderr, "%s\n", output.utf8().data()); |
1120 } | 1123 } |
1121 #endif | 1124 #endif |
OLD | NEW |