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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 , m_maskLayer(0) | 98 , m_maskLayer(0) |
99 , m_contentsClippingMaskLayer(0) | 99 , m_contentsClippingMaskLayer(0) |
100 , m_replicaLayer(0) | 100 , m_replicaLayer(0) |
101 , m_replicatedLayer(0) | 101 , m_replicatedLayer(0) |
102 , m_paintCount(0) | 102 , m_paintCount(0) |
103 , m_contentsLayer(0) | 103 , m_contentsLayer(0) |
104 , m_contentsLayerId(0) | 104 , m_contentsLayerId(0) |
105 , m_scrollableArea(0) | 105 , m_scrollableArea(0) |
106 , m_3dRenderingContext(0) | 106 , m_3dRenderingContext(0) |
107 { | 107 { |
108 #ifndef NDEBUG | 108 #if ENABLE(ASSERT) |
109 if (m_client) | 109 if (m_client) |
110 m_client->verifyNotPainting(); | 110 m_client->verifyNotPainting(); |
111 #endif | 111 #endif |
112 | 112 |
113 m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingCo
ntentLayerDelegate(this)); | 113 m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingCo
ntentLayerDelegate(this)); |
114 m_layer = adoptPtr(Platform::current()->compositorSupport()->createContentLa
yer(m_opaqueRectTrackingContentLayerDelegate.get())); | 114 m_layer = adoptPtr(Platform::current()->compositorSupport()->createContentLa
yer(m_opaqueRectTrackingContentLayerDelegate.get())); |
115 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); | 115 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); |
116 m_layer->layer()->setWebLayerClient(this); | 116 m_layer->layer()->setWebLayerClient(this); |
117 m_layer->setAutomaticallyComputeRasterScale(true); | 117 m_layer->setAutomaticallyComputeRasterScale(true); |
118 } | 118 } |
119 | 119 |
120 GraphicsLayer::~GraphicsLayer() | 120 GraphicsLayer::~GraphicsLayer() |
121 { | 121 { |
122 for (size_t i = 0; i < m_linkHighlights.size(); ++i) | 122 for (size_t i = 0; i < m_linkHighlights.size(); ++i) |
123 m_linkHighlights[i]->clearCurrentGraphicsLayer(); | 123 m_linkHighlights[i]->clearCurrentGraphicsLayer(); |
124 m_linkHighlights.clear(); | 124 m_linkHighlights.clear(); |
125 | 125 |
126 #ifndef NDEBUG | 126 #if ENABLE(ASSERT) |
127 if (m_client) | 127 if (m_client) |
128 m_client->verifyNotPainting(); | 128 m_client->verifyNotPainting(); |
129 #endif | 129 #endif |
130 | 130 |
131 if (m_replicaLayer) | 131 if (m_replicaLayer) |
132 m_replicaLayer->setReplicatedLayer(0); | 132 m_replicaLayer->setReplicatedLayer(0); |
133 | 133 |
134 if (m_replicatedLayer) | 134 if (m_replicatedLayer) |
135 m_replicatedLayer->setReplicatedByLayer(0); | 135 m_replicatedLayer->setReplicatedByLayer(0); |
136 | 136 |
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 #ifndef NDEBUG | 1127 #ifndef NDEBUG |
1128 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1128 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1129 { | 1129 { |
1130 if (!layer) | 1130 if (!layer) |
1131 return; | 1131 return; |
1132 | 1132 |
1133 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1133 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
1134 fprintf(stderr, "%s\n", output.utf8().data()); | 1134 fprintf(stderr, "%s\n", output.utf8().data()); |
1135 } | 1135 } |
1136 #endif | 1136 #endif |
OLD | NEW |