| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 m_offsetFromRenderer = offset; | 351 m_offsetFromRenderer = offset; |
| 352 | 352 |
| 353 // If the compositing layer offset changes, we need to repaint. | 353 // If the compositing layer offset changes, we need to repaint. |
| 354 if (shouldSetNeedsDisplay == SetNeedsDisplay) | 354 if (shouldSetNeedsDisplay == SetNeedsDisplay) |
| 355 setNeedsDisplay(); | 355 setNeedsDisplay(); |
| 356 } | 356 } |
| 357 | 357 |
| 358 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
ntRect& clip) | 358 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
ntRect& clip) |
| 359 { | 359 { |
| 360 if (m_client) | 360 if (m_client) { |
| 361 TRACE_EVENT_INSTANT2("core,painting", "GraphicsLayer::paintGraphicsLayer
Contents", |
| 362 "width", clip.width(), "height", clip.height()); |
| 363 |
| 361 m_client->paintContents(this, context, m_paintingPhase, clip); | 364 m_client->paintContents(this, context, m_paintingPhase, clip); |
| 365 } |
| 362 } | 366 } |
| 363 | 367 |
| 364 String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property) | 368 String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property) |
| 365 { | 369 { |
| 366 // | is not a valid identifier character in CSS, so this can never conflict
with a keyframe identifier. | 370 // | is not a valid identifier character in CSS, so this can never conflict
with a keyframe identifier. |
| 367 StringBuilder id; | 371 StringBuilder id; |
| 368 id.appendLiteral("-|transition"); | 372 id.appendLiteral("-|transition"); |
| 369 id.appendNumber(static_cast<int>(property)); | 373 id.appendNumber(static_cast<int>(property)); |
| 370 id.append('-'); | 374 id.append('-'); |
| 371 return id.toString(); | 375 return id.toString(); |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 m_client->notifyAnimationStarted(this, startTime); | 1300 m_client->notifyAnimationStarted(this, startTime); |
| 1297 } | 1301 } |
| 1298 | 1302 |
| 1299 void GraphicsLayer::notifyAnimationFinished(double) | 1303 void GraphicsLayer::notifyAnimationFinished(double) |
| 1300 { | 1304 { |
| 1301 // Do nothing. | 1305 // Do nothing. |
| 1302 } | 1306 } |
| 1303 | 1307 |
| 1304 void GraphicsLayer::didScroll() | 1308 void GraphicsLayer::didScroll() |
| 1305 { | 1309 { |
| 1310 TRACE_EVENT1( |
| 1311 "impl-scroll", |
| 1312 "GraphicsLayer::didScroll", |
| 1313 "layerId", |
| 1314 m_layer->layer()->id()); |
| 1315 |
| 1306 if (m_scrollableArea) | 1316 if (m_scrollableArea) |
| 1307 m_scrollableArea->scrollToOffsetWithoutAnimation(m_scrollableArea->minim
umScrollPosition() + toIntSize(m_layer->layer()->scrollPosition())); | 1317 m_scrollableArea->scrollToOffsetWithoutAnimation(m_scrollableArea->minim
umScrollPosition() + toIntSize(m_layer->layer()->scrollPosition())); |
| 1308 } | 1318 } |
| 1309 | 1319 |
| 1310 } // namespace WebCore | 1320 } // namespace WebCore |
| 1311 | 1321 |
| 1312 #ifndef NDEBUG | 1322 #ifndef NDEBUG |
| 1313 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1323 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
| 1314 { | 1324 { |
| 1315 if (!layer) | 1325 if (!layer) |
| 1316 return; | 1326 return; |
| 1317 | 1327 |
| 1318 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1328 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
| 1319 fprintf(stderr, "%s\n", output.utf8().data()); | 1329 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1320 } | 1330 } |
| 1321 #endif | 1331 #endif |
| OLD | NEW |