| 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 953 void GraphicsLayer::setMasksToBounds(bool masksToBounds) | 952 void GraphicsLayer::setMasksToBounds(bool masksToBounds) |
| 954 { | 953 { |
| 955 m_masksToBounds = masksToBounds; | 954 m_layer->layer()->setMasksToBounds(masksToBounds); |
| 956 m_layer->layer()->setMasksToBounds(m_masksToBounds); | |
| 957 } | 955 } |
| 958 | 956 |
| 959 void GraphicsLayer::setDrawsContent(bool drawsContent) | 957 void GraphicsLayer::setDrawsContent(bool drawsContent) |
| 960 { | 958 { |
| 961 // Note carefully this early-exit is only correct because we also properly c
all | 959 // 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(). | 960 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer
in setupContentsLayer(). |
| 963 if (drawsContent == m_drawsContent) | 961 if (drawsContent == m_drawsContent) |
| 964 return; | 962 return; |
| 965 | 963 |
| 966 m_drawsContent = drawsContent; | 964 m_drawsContent = drawsContent; |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 { | 1344 { |
| 1347 if (!layer) { | 1345 if (!layer) { |
| 1348 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1346 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1349 return; | 1347 return; |
| 1350 } | 1348 } |
| 1351 | 1349 |
| 1352 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1350 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1353 fprintf(stderr, "%s\n", output.utf8().data()); | 1351 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1354 } | 1352 } |
| 1355 #endif | 1353 #endif |
| OLD | NEW |