| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 template class RasterInvalidationTrackingMap<const GraphicsLayer>; | 74 template class RasterInvalidationTrackingMap<const GraphicsLayer>; |
| 75 static RasterInvalidationTrackingMap<const GraphicsLayer>& | 75 static RasterInvalidationTrackingMap<const GraphicsLayer>& |
| 76 rasterInvalidationTrackingMap() { | 76 rasterInvalidationTrackingMap() { |
| 77 DEFINE_STATIC_LOCAL(RasterInvalidationTrackingMap<const GraphicsLayer>, map, | 77 DEFINE_STATIC_LOCAL(RasterInvalidationTrackingMap<const GraphicsLayer>, map, |
| 78 ()); | 78 ()); |
| 79 return map; | 79 return map; |
| 80 } | 80 } |
| 81 | 81 |
| 82 std::unique_ptr<GraphicsLayer> GraphicsLayer::create( | 82 std::unique_ptr<GraphicsLayer> GraphicsLayer::create( |
| 83 GraphicsLayerClient* client) { | 83 GraphicsLayerClient* client) { |
| 84 return wrapUnique(new GraphicsLayer(client)); | 84 return WTF::wrapUnique(new GraphicsLayer(client)); |
| 85 } | 85 } |
| 86 | 86 |
| 87 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) | 87 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) |
| 88 : m_client(client), | 88 : m_client(client), |
| 89 m_backgroundColor(Color::transparent), | 89 m_backgroundColor(Color::transparent), |
| 90 m_opacity(1), | 90 m_opacity(1), |
| 91 m_blendMode(WebBlendModeNormal), | 91 m_blendMode(WebBlendModeNormal), |
| 92 m_hasTransformOrigin(false), | 92 m_hasTransformOrigin(false), |
| 93 m_contentsOpaque(false), | 93 m_contentsOpaque(false), |
| 94 m_shouldFlattenTransform(true), | 94 m_shouldFlattenTransform(true), |
| (...skipping 14 matching lines...) Expand all 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 = makeUnique<ContentLayerDelegate>(this); | 119 m_contentLayerDelegate = WTF::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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { | 1319 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { |
| 1320 if (!layer) { | 1320 if (!layer) { |
| 1321 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; | 1321 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; |
| 1322 return; | 1322 return; |
| 1323 } | 1323 } |
| 1324 | 1324 |
| 1325 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1325 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1326 LOG(INFO) << output.utf8().data(); | 1326 LOG(INFO) << output.utf8().data(); |
| 1327 } | 1327 } |
| 1328 #endif | 1328 #endif |
| OLD | NEW |