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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 : m_client(client) | 108 : m_client(client) |
109 , m_anchorPoint(0.5f, 0.5f, 0) | 109 , m_anchorPoint(0.5f, 0.5f, 0) |
110 , m_opacity(1) | 110 , m_opacity(1) |
111 , m_zPosition(0) | 111 , m_zPosition(0) |
112 , m_contentsOpaque(false) | 112 , m_contentsOpaque(false) |
113 , m_preserves3D(false) | 113 , m_preserves3D(false) |
114 , m_backfaceVisibility(true) | 114 , m_backfaceVisibility(true) |
115 , m_masksToBounds(false) | 115 , m_masksToBounds(false) |
116 , m_drawsContent(false) | 116 , m_drawsContent(false) |
117 , m_contentsVisible(true) | 117 , m_contentsVisible(true) |
118 , m_showRepaintCounter(false) | |
119 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 118 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
120 , m_contentsOrientation(CompositingCoordinatesTopDown) | 119 , m_contentsOrientation(CompositingCoordinatesTopDown) |
121 , m_parent(0) | 120 , m_parent(0) |
122 , m_maskLayer(0) | 121 , m_maskLayer(0) |
123 , m_replicaLayer(0) | 122 , m_replicaLayer(0) |
124 , m_replicatedLayer(0) | 123 , m_replicatedLayer(0) |
125 , m_repaintCount(0) | 124 , m_paintCount(0) |
126 , m_contentsLayer(0) | 125 , m_contentsLayer(0) |
127 , m_contentsLayerId(0) | 126 , m_contentsLayerId(0) |
128 , m_linkHighlight(0) | 127 , m_linkHighlight(0) |
129 , m_contentsLayerPurpose(NoContentsLayer) | 128 , m_contentsLayerPurpose(NoContentsLayer) |
130 , m_scrollableArea(0) | 129 , m_scrollableArea(0) |
131 { | 130 { |
132 #ifndef NDEBUG | 131 #ifndef NDEBUG |
133 if (m_client) | 132 if (m_client) |
134 m_client->verifyNotPainting(); | 133 m_client->verifyNotPainting(); |
135 #endif | 134 #endif |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 350 |
352 m_offsetFromRenderer = offset; | 351 m_offsetFromRenderer = offset; |
353 | 352 |
354 // If the compositing layer offset changes, we need to repaint. | 353 // If the compositing layer offset changes, we need to repaint. |
355 if (shouldSetNeedsDisplay == SetNeedsDisplay) | 354 if (shouldSetNeedsDisplay == SetNeedsDisplay) |
356 setNeedsDisplay(); | 355 setNeedsDisplay(); |
357 } | 356 } |
358 | 357 |
359 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
ntRect& clip) | 358 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
ntRect& clip) |
360 { | 359 { |
361 if (m_client) | 360 if (!m_client) |
362 m_client->paintContents(this, context, m_paintingPhase, clip); | 361 return; |
| 362 incrementPaintCount(); |
| 363 m_client->paintContents(this, context, m_paintingPhase, clip); |
363 } | 364 } |
364 | 365 |
365 String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property) | 366 String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property) |
366 { | 367 { |
367 // | is not a valid identifier character in CSS, so this can never conflict
with a keyframe identifier. | 368 // | is not a valid identifier character in CSS, so this can never conflict
with a keyframe identifier. |
368 StringBuilder id; | 369 StringBuilder id; |
369 id.appendLiteral("-|transition"); | 370 id.appendLiteral("-|transition"); |
370 id.appendNumber(static_cast<int>(property)); | 371 id.appendNumber(static_cast<int>(property)); |
371 id.append('-'); | 372 id.append('-'); |
372 return id.toString(); | 373 return id.toString(); |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 } else if (webLayer == m_layer->layer()) { | 886 } else if (webLayer == m_layer->layer()) { |
886 name = m_client->debugName(this); | 887 name = m_client->debugName(this); |
887 } else { | 888 } else { |
888 ASSERT_NOT_REACHED(); | 889 ASSERT_NOT_REACHED(); |
889 } | 890 } |
890 return name; | 891 return name; |
891 } | 892 } |
892 | 893 |
893 void GraphicsLayer::setCompositingReasons(WebKit::WebCompositingReasons reasons) | 894 void GraphicsLayer::setCompositingReasons(WebKit::WebCompositingReasons reasons) |
894 { | 895 { |
| 896 m_compositingReasons = reasons; |
895 m_layer->layer()->setCompositingReasons(reasons); | 897 m_layer->layer()->setCompositingReasons(reasons); |
896 } | 898 } |
897 | 899 |
898 void GraphicsLayer::setPosition(const FloatPoint& point) | 900 void GraphicsLayer::setPosition(const FloatPoint& point) |
899 { | 901 { |
900 m_position = point; | 902 m_position = point; |
901 platformLayer()->setPosition(m_position); | 903 platformLayer()->setPosition(m_position); |
902 } | 904 } |
903 | 905 |
904 void GraphicsLayer::setAnchorPoint(const FloatPoint3D& point) | 906 void GraphicsLayer::setAnchorPoint(const FloatPoint3D& point) |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 #ifndef NDEBUG | 1330 #ifndef NDEBUG |
1329 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1331 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1330 { | 1332 { |
1331 if (!layer) | 1333 if (!layer) |
1332 return; | 1334 return; |
1333 | 1335 |
1334 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1336 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
1335 fprintf(stderr, "%s\n", output.utf8().data()); | 1337 fprintf(stderr, "%s\n", output.utf8().data()); |
1336 } | 1338 } |
1337 #endif | 1339 #endif |
OLD | NEW |