| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 m_contentsLayer(0), | 109 m_contentsLayer(0), |
| 110 m_contentsLayerId(0), | 110 m_contentsLayerId(0), |
| 111 m_scrollableArea(nullptr), | 111 m_scrollableArea(nullptr), |
| 112 m_renderingContext3d(0), | 112 m_renderingContext3d(0), |
| 113 m_hasPreferredRasterBounds(false) { | 113 m_hasPreferredRasterBounds(false) { |
| 114 #if ENABLE(ASSERT) | 114 #if ENABLE(ASSERT) |
| 115 if (m_client) | 115 if (m_client) |
| 116 m_client->verifyNotPainting(); | 116 m_client->verifyNotPainting(); |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 m_contentLayerDelegate = wrapUnique(new ContentLayerDelegate(this)); | 119 m_contentLayerDelegate = makeUnique<ContentLayerDelegate>(this); |
| 120 m_layer = Platform::current()->compositorSupport()->createContentLayer( | 120 m_layer = Platform::current()->compositorSupport()->createContentLayer( |
| 121 m_contentLayerDelegate.get()); | 121 m_contentLayerDelegate.get()); |
| 122 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); | 122 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); |
| 123 m_layer->layer()->setLayerClient(this); | 123 m_layer->layer()->setLayerClient(this); |
| 124 } | 124 } |
| 125 | 125 |
| 126 GraphicsLayer::~GraphicsLayer() { | 126 GraphicsLayer::~GraphicsLayer() { |
| 127 for (size_t i = 0; i < m_linkHighlights.size(); ++i) | 127 for (size_t i = 0; i < m_linkHighlights.size(); ++i) |
| 128 m_linkHighlights[i]->clearCurrentGraphicsLayer(); | 128 m_linkHighlights[i]->clearCurrentGraphicsLayer(); |
| 129 m_linkHighlights.clear(); | 129 m_linkHighlights.clear(); |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { | 1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { |
| 1309 if (!layer) { | 1309 if (!layer) { |
| 1310 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1310 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1311 return; | 1311 return; |
| 1312 } | 1312 } |
| 1313 | 1313 |
| 1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1315 fprintf(stderr, "%s\n", output.utf8().data()); | 1315 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1316 } | 1316 } |
| 1317 #endif | 1317 #endif |
| OLD | NEW |