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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 } | 292 } |
293 | 293 |
294 void GraphicsLayer::paintIfNeeded(GraphicsContext& context) | 294 void GraphicsLayer::paintIfNeeded(GraphicsContext& context) |
295 { | 295 { |
296 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); | 296 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
297 if (!m_client) | 297 if (!m_client) |
298 return; | 298 return; |
299 if (firstPaintInvalidationTrackingEnabled()) | 299 if (firstPaintInvalidationTrackingEnabled()) |
300 m_debugInfo.clearAnnotatedInvalidateRects(); | 300 m_debugInfo.clearAnnotatedInvalidateRects(); |
301 incrementPaintCount(); | 301 incrementPaintCount(); |
302 #ifndef NDEBUG | |
303 if (m_paintController && contentsOpaque() && s_drawDebugRedFill) { | |
304 FloatRect rect(FloatPoint(), size()); | |
305 if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, Display Item::DebugRedFill)) { | |
306 DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect); | |
307 context.fillRect(rect, SK_ColorRED); | |
308 } | |
309 } | |
310 #endif | |
Xianzhu
2015/10/28 18:10:23
These are copied from GraphicsLayer::paint().
Per
| |
302 m_client->paintContentsIfNeeded(this, context, m_paintingPhase); | 311 m_client->paintContentsIfNeeded(this, context, m_paintingPhase); |
312 if (!m_textPainted && m_paintController->textPainted()) { | |
313 m_textPainted = true; | |
314 m_client->notifyTextPainted(); | |
315 } | |
303 } | 316 } |
304 | 317 |
305 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) | 318 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) |
306 { | 319 { |
307 if (!m_client) | 320 if (!m_client) |
308 return; | 321 return; |
309 if (firstPaintInvalidationTrackingEnabled()) | 322 if (firstPaintInvalidationTrackingEnabled()) |
310 m_debugInfo.clearAnnotatedInvalidateRects(); | 323 m_debugInfo.clearAnnotatedInvalidateRects(); |
311 incrementPaintCount(); | 324 incrementPaintCount(); |
312 #ifndef NDEBUG | 325 #ifndef NDEBUG |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1182 { | 1195 { |
1183 if (!layer) { | 1196 if (!layer) { |
1184 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1197 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1185 return; | 1198 return; |
1186 } | 1199 } |
1187 | 1200 |
1188 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1201 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1189 fprintf(stderr, "%s\n", output.utf8().data()); | 1202 fprintf(stderr, "%s\n", output.utf8().data()); |
1190 } | 1203 } |
1191 #endif | 1204 #endif |
OLD | NEW |