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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 { | 281 { |
282 if (!m_client) | 282 if (!m_client) |
283 return; | 283 return; |
284 if (firstPaintInvalidationTrackingEnabled()) | 284 if (firstPaintInvalidationTrackingEnabled()) |
285 m_debugInfo.clearAnnotatedInvalidateRects(); | 285 m_debugInfo.clearAnnotatedInvalidateRects(); |
286 incrementPaintCount(); | 286 incrementPaintCount(); |
287 #ifndef NDEBUG | 287 #ifndef NDEBUG |
288 if (m_displayItemList && contentsOpaque()) { | 288 if (m_displayItemList && contentsOpaque()) { |
289 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); | 289 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
290 FloatRect rect(FloatPoint(), size()); | 290 FloatRect rect(FloatPoint(), size()); |
291 DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect
); | 291 if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, Display
Item::DebugRedFill)) { |
292 if (!recorder.canUseCachedDrawing()) | 292 DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill,
rect); |
293 context.fillRect(rect, SK_ColorRED); | 293 context.fillRect(rect, SK_ColorRED); |
| 294 } |
294 } | 295 } |
295 #endif | 296 #endif |
296 m_client->paintContents(this, context, m_paintingPhase, clip); | 297 m_client->paintContents(this, context, m_paintingPhase, clip); |
297 } | 298 } |
298 | 299 |
299 void GraphicsLayer::updateChildList() | 300 void GraphicsLayer::updateChildList() |
300 { | 301 { |
301 WebLayer* childHost = m_layer->layer(); | 302 WebLayer* childHost = m_layer->layer(); |
302 childHost->removeAllChildren(); | 303 childHost->removeAllChildren(); |
303 | 304 |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 { | 1175 { |
1175 if (!layer) { | 1176 if (!layer) { |
1176 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1177 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1177 return; | 1178 return; |
1178 } | 1179 } |
1179 | 1180 |
1180 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1181 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1181 fprintf(stderr, "%s\n", output.utf8().data()); | 1182 fprintf(stderr, "%s\n", output.utf8().data()); |
1182 } | 1183 } |
1183 #endif | 1184 #endif |
OLD | NEW |