| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 294 } |
| 295 | 295 |
| 296 void GraphicsLayer::paintIfNeeded(GraphicsContext& context) | 296 void GraphicsLayer::paintIfNeeded(GraphicsContext& context) |
| 297 { | 297 { |
| 298 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); | 298 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
| 299 if (!m_client) | 299 if (!m_client) |
| 300 return; | 300 return; |
| 301 if (firstPaintInvalidationTrackingEnabled()) | 301 if (firstPaintInvalidationTrackingEnabled()) |
| 302 m_debugInfo.clearAnnotatedInvalidateRects(); | 302 m_debugInfo.clearAnnotatedInvalidateRects(); |
| 303 incrementPaintCount(); | 303 incrementPaintCount(); |
| 304 #ifndef NDEBUG |
| 305 if (m_paintController && contentsOpaque() && s_drawDebugRedFill) { |
| 306 FloatRect rect(FloatPoint(), size()); |
| 307 if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, Display
Item::DebugRedFill)) { |
| 308 DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill,
rect); |
| 309 context.fillRect(rect, SK_ColorRED); |
| 310 } |
| 311 } |
| 312 #endif |
| 304 m_client->paintContentsIfNeeded(this, context, m_paintingPhase); | 313 m_client->paintContentsIfNeeded(this, context, m_paintingPhase); |
| 305 notifyFirstPaintToClient(); | 314 notifyFirstPaintToClient(); |
| 306 } | 315 } |
| 307 | 316 |
| 308 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) | 317 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) |
| 309 { | 318 { |
| 310 if (!m_client) | 319 if (!m_client) |
| 311 return; | 320 return; |
| 312 if (firstPaintInvalidationTrackingEnabled()) | 321 if (firstPaintInvalidationTrackingEnabled()) |
| 313 m_debugInfo.clearAnnotatedInvalidateRects(); | 322 m_debugInfo.clearAnnotatedInvalidateRects(); |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 { | 1207 { |
| 1199 if (!layer) { | 1208 if (!layer) { |
| 1200 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1209 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1201 return; | 1210 return; |
| 1202 } | 1211 } |
| 1203 | 1212 |
| 1204 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1213 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1205 fprintf(stderr, "%s\n", output.utf8().data()); | 1214 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1206 } | 1215 } |
| 1207 #endif | 1216 #endif |
| OLD | NEW |