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_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) | 130 , m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) |
132 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 131 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
133 , m_parent(0) | 132 , m_parent(0) |
134 , m_maskLayer(0) | 133 , m_maskLayer(0) |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 if (m_3dRenderingContext == context) | 950 if (m_3dRenderingContext == context) |
952 return; | 951 return; |
953 | 952 |
954 m_3dRenderingContext = context; | 953 m_3dRenderingContext = context; |
955 m_layer->layer()->setRenderingContext(context); | 954 m_layer->layer()->setRenderingContext(context); |
956 | 955 |
957 if (m_contentsLayer) | 956 if (m_contentsLayer) |
958 m_contentsLayer->setRenderingContext(m_3dRenderingContext); | 957 m_contentsLayer->setRenderingContext(m_3dRenderingContext); |
959 } | 958 } |
960 | 959 |
| 960 bool GraphicsLayer::masksToBounds() const |
| 961 { |
| 962 return m_layer->layer()->masksToBounds(); |
| 963 } |
| 964 |
961 void GraphicsLayer::setMasksToBounds(bool masksToBounds) | 965 void GraphicsLayer::setMasksToBounds(bool masksToBounds) |
962 { | 966 { |
963 m_masksToBounds = masksToBounds; | 967 m_layer->layer()->setMasksToBounds(masksToBounds); |
964 m_layer->layer()->setMasksToBounds(m_masksToBounds); | |
965 } | 968 } |
966 | 969 |
967 void GraphicsLayer::setDrawsContent(bool drawsContent) | 970 void GraphicsLayer::setDrawsContent(bool drawsContent) |
968 { | 971 { |
969 // Note carefully this early-exit is only correct because we also properly c
all | 972 // Note carefully this early-exit is only correct because we also properly c
all |
970 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer
in setupContentsLayer(). | 973 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer
in setupContentsLayer(). |
971 if (drawsContent == m_drawsContent) | 974 if (drawsContent == m_drawsContent) |
972 return; | 975 return; |
973 | 976 |
974 m_drawsContent = drawsContent; | 977 m_drawsContent = drawsContent; |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 { | 1353 { |
1351 if (!layer) { | 1354 if (!layer) { |
1352 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1355 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1353 return; | 1356 return; |
1354 } | 1357 } |
1355 | 1358 |
1356 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1359 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1357 fprintf(stderr, "%s\n", output.utf8().data()); | 1360 fprintf(stderr, "%s\n", output.utf8().data()); |
1358 } | 1361 } |
1359 #endif | 1362 #endif |
OLD | NEW |