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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) | 112 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) |
113 : m_client(client) | 113 : m_client(client) |
114 , m_backgroundColor(Color::transparent) | 114 , m_backgroundColor(Color::transparent) |
115 , m_opacity(1) | 115 , m_opacity(1) |
116 , m_blendMode(WebBlendModeNormal) | 116 , m_blendMode(WebBlendModeNormal) |
117 , m_hasTransformOrigin(false) | 117 , m_hasTransformOrigin(false) |
118 , m_contentsOpaque(false) | 118 , m_contentsOpaque(false) |
119 , m_shouldFlattenTransform(true) | 119 , m_shouldFlattenTransform(true) |
120 , m_backfaceVisibility(true) | 120 , m_backfaceVisibility(true) |
121 , m_masksToBounds(false) | |
122 , m_drawsContent(false) | 121 , m_drawsContent(false) |
123 , m_contentsVisible(true) | 122 , m_contentsVisible(true) |
124 , m_isRootForIsolatedGroup(false) | 123 , m_isRootForIsolatedGroup(false) |
125 , m_hasScrollParent(false) | 124 , m_hasScrollParent(false) |
126 , m_hasClipParent(false) | 125 , m_hasClipParent(false) |
127 , m_painted(false) | 126 , m_painted(false) |
128 , m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) | 127 , m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidati
ons()) |
129 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 128 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
130 , m_parent(0) | 129 , m_parent(0) |
131 , m_maskLayer(0) | 130 , m_maskLayer(0) |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 | 946 |
948 m_renderingContext3d = context; | 947 m_renderingContext3d = context; |
949 m_layer->layer()->setRenderingContext(context); | 948 m_layer->layer()->setRenderingContext(context); |
950 | 949 |
951 if (m_contentsLayer) | 950 if (m_contentsLayer) |
952 m_contentsLayer->setRenderingContext(m_renderingContext3d); | 951 m_contentsLayer->setRenderingContext(m_renderingContext3d); |
953 } | 952 } |
954 | 953 |
955 void GraphicsLayer::setMasksToBounds(bool masksToBounds) | 954 void GraphicsLayer::setMasksToBounds(bool masksToBounds) |
956 { | 955 { |
957 m_masksToBounds = masksToBounds; | 956 m_layer->layer()->setMasksToBounds(masksToBounds); |
958 m_layer->layer()->setMasksToBounds(m_masksToBounds); | |
959 } | 957 } |
960 | 958 |
961 void GraphicsLayer::setDrawsContent(bool drawsContent) | 959 void GraphicsLayer::setDrawsContent(bool drawsContent) |
962 { | 960 { |
963 // Note carefully this early-exit is only correct because we also properly c
all | 961 // Note carefully this early-exit is only correct because we also properly c
all |
964 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer
in setupContentsLayer(). | 962 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer
in setupContentsLayer(). |
965 if (drawsContent == m_drawsContent) | 963 if (drawsContent == m_drawsContent) |
966 return; | 964 return; |
967 | 965 |
968 m_drawsContent = drawsContent; | 966 m_drawsContent = drawsContent; |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 { | 1351 { |
1354 if (!layer) { | 1352 if (!layer) { |
1355 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1353 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
1356 return; | 1354 return; |
1357 } | 1355 } |
1358 | 1356 |
1359 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1357 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1360 fprintf(stderr, "%s\n", output.utf8().data()); | 1358 fprintf(stderr, "%s\n", output.utf8().data()); |
1361 } | 1359 } |
1362 #endif | 1360 #endif |
OLD | NEW |