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