| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) | 115 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) |
| 116 : m_client(client) | 116 : m_client(client) |
| 117 , m_backgroundColor(Color::transparent) | 117 , m_backgroundColor(Color::transparent) |
| 118 , m_opacity(1) | 118 , m_opacity(1) |
| 119 , m_blendMode(WebBlendModeNormal) | 119 , m_blendMode(WebBlendModeNormal) |
| 120 , m_hasTransformOrigin(false) | 120 , m_hasTransformOrigin(false) |
| 121 , m_contentsOpaque(false) | 121 , m_contentsOpaque(false) |
| 122 , m_shouldFlattenTransform(true) | 122 , m_shouldFlattenTransform(true) |
| 123 , m_backfaceVisibility(true) | 123 , m_backfaceVisibility(true) |
| 124 , m_masksToBounds(false) | |
| 125 , m_drawsContent(false) | 124 , m_drawsContent(false) |
| 126 , m_contentsVisible(true) | 125 , m_contentsVisible(true) |
| 127 , m_isRootForIsolatedGroup(false) | 126 , m_isRootForIsolatedGroup(false) |
| 128 , m_hasScrollParent(false) | 127 , m_hasScrollParent(false) |
| 129 , m_hasClipParent(false) | 128 , m_hasClipParent(false) |
| 130 , m_painted(false) | 129 , m_painted(false) |
| 131 , m_textPainted(false) | 130 , m_textPainted(false) |
| 132 , m_imagePainted(false) | 131 , m_imagePainted(false) |
| 133 , m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) | 132 , m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) |
| 134 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 133 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 if (m_3dRenderingContext == context) | 958 if (m_3dRenderingContext == context) |
| 960 return; | 959 return; |
| 961 | 960 |
| 962 m_3dRenderingContext = context; | 961 m_3dRenderingContext = context; |
| 963 m_layer->layer()->setRenderingContext(context); | 962 m_layer->layer()->setRenderingContext(context); |
| 964 | 963 |
| 965 if (m_contentsLayer) | 964 if (m_contentsLayer) |
| 966 m_contentsLayer->setRenderingContext(m_3dRenderingContext); | 965 m_contentsLayer->setRenderingContext(m_3dRenderingContext); |
| 967 } | 966 } |
| 968 | 967 |
| 968 bool GraphicsLayer::masksToBounds() const |
| 969 { |
| 970 return m_layer->layer()->masksToBounds(); |
| 971 } |
| 972 |
| 969 void GraphicsLayer::setMasksToBounds(bool masksToBounds) | 973 void GraphicsLayer::setMasksToBounds(bool masksToBounds) |
| 970 { | 974 { |
| 971 m_masksToBounds = masksToBounds; | 975 m_layer->layer()->setMasksToBounds(masksToBounds); |
| 972 m_layer->layer()->setMasksToBounds(m_masksToBounds); | |
| 973 } | 976 } |
| 974 | 977 |
| 975 void GraphicsLayer::setDrawsContent(bool drawsContent) | 978 void GraphicsLayer::setDrawsContent(bool drawsContent) |
| 976 { | 979 { |
| 977 // Note carefully this early-exit is only correct because we also properly c
all | 980 // Note carefully this early-exit is only correct because we also properly c
all |
| 978 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer
in setupContentsLayer(). | 981 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer
in setupContentsLayer(). |
| 979 if (drawsContent == m_drawsContent) | 982 if (drawsContent == m_drawsContent) |
| 980 return; | 983 return; |
| 981 | 984 |
| 982 m_drawsContent = drawsContent; | 985 m_drawsContent = drawsContent; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 { | 1361 { |
| 1359 if (!layer) { | 1362 if (!layer) { |
| 1360 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1363 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1361 return; | 1364 return; |
| 1362 } | 1365 } |
| 1363 | 1366 |
| 1364 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1367 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1365 fprintf(stderr, "%s\n", output.utf8().data()); | 1368 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1366 } | 1369 } |
| 1367 #endif | 1370 #endif |
| OLD | NEW |