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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 , m_opacity(1) | 82 , m_opacity(1) |
83 , m_zPosition(0) | 83 , m_zPosition(0) |
84 , m_blendMode(blink::WebBlendModeNormal) | 84 , m_blendMode(blink::WebBlendModeNormal) |
85 , m_contentsOpaque(false) | 85 , m_contentsOpaque(false) |
86 , m_shouldFlattenTransform(true) | 86 , m_shouldFlattenTransform(true) |
87 , m_backfaceVisibility(true) | 87 , m_backfaceVisibility(true) |
88 , m_masksToBounds(false) | 88 , m_masksToBounds(false) |
89 , m_drawsContent(false) | 89 , m_drawsContent(false) |
90 , m_contentsVisible(true) | 90 , m_contentsVisible(true) |
91 , m_isRootForIsolatedGroup(false) | 91 , m_isRootForIsolatedGroup(false) |
92 , m_hasGpuRasterizationHint(false) | |
93 , m_hasScrollParent(false) | 92 , m_hasScrollParent(false) |
94 , m_hasClipParent(false) | 93 , m_hasClipParent(false) |
95 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 94 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
96 , m_contentsOrientation(CompositingCoordinatesTopDown) | 95 , m_contentsOrientation(CompositingCoordinatesTopDown) |
97 , m_parent(0) | 96 , m_parent(0) |
98 , m_maskLayer(0) | 97 , m_maskLayer(0) |
99 , m_contentsClippingMaskLayer(0) | 98 , m_contentsClippingMaskLayer(0) |
100 , m_replicaLayer(0) | 99 , m_replicaLayer(0) |
101 , m_replicatedLayer(0) | 100 , m_replicatedLayer(0) |
102 , m_paintCount(0) | 101 , m_paintCount(0) |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 if (m_drawsContent) { | 600 if (m_drawsContent) { |
602 writeIndent(ts, indent + 1); | 601 writeIndent(ts, indent + 1); |
603 ts << "(drawsContent " << m_drawsContent << ")\n"; | 602 ts << "(drawsContent " << m_drawsContent << ")\n"; |
604 } | 603 } |
605 | 604 |
606 if (!m_contentsVisible) { | 605 if (!m_contentsVisible) { |
607 writeIndent(ts, indent + 1); | 606 writeIndent(ts, indent + 1); |
608 ts << "(contentsVisible " << m_contentsVisible << ")\n"; | 607 ts << "(contentsVisible " << m_contentsVisible << ")\n"; |
609 } | 608 } |
610 | 609 |
611 if (m_hasGpuRasterizationHint) { | |
612 writeIndent(ts, indent + 1); | |
613 ts << "(hasGpuRasterizationHint " << m_hasGpuRasterizationHint << ")\n"; | |
614 } | |
615 | |
616 if (!m_backfaceVisibility) { | 610 if (!m_backfaceVisibility) { |
617 writeIndent(ts, indent + 1); | 611 writeIndent(ts, indent + 1); |
618 ts << "(backfaceVisibility " << (m_backfaceVisibility ? "visible" : "hid
den") << ")\n"; | 612 ts << "(backfaceVisibility " << (m_backfaceVisibility ? "visible" : "hid
den") << ")\n"; |
619 } | 613 } |
620 | 614 |
621 if (flags & LayerTreeIncludesDebugInfo) { | 615 if (flags & LayerTreeIncludesDebugInfo) { |
622 writeIndent(ts, indent + 1); | 616 writeIndent(ts, indent + 1); |
623 ts << "("; | 617 ts << "("; |
624 if (m_client) | 618 if (m_client) |
625 ts << "client " << static_cast<void*>(m_client); | 619 ts << "client " << static_cast<void*>(m_client); |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 } | 939 } |
946 | 940 |
947 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) | 941 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) |
948 { | 942 { |
949 if (m_isRootForIsolatedGroup == isolated) | 943 if (m_isRootForIsolatedGroup == isolated) |
950 return; | 944 return; |
951 m_isRootForIsolatedGroup = isolated; | 945 m_isRootForIsolatedGroup = isolated; |
952 platformLayer()->setIsRootForIsolatedGroup(isolated); | 946 platformLayer()->setIsRootForIsolatedGroup(isolated); |
953 } | 947 } |
954 | 948 |
955 void GraphicsLayer::setHasGpuRasterizationHint(bool hasHint) | |
956 { | |
957 m_hasGpuRasterizationHint = hasHint; | |
958 m_layer->setHasGpuRasterizationHint(hasHint); | |
959 } | |
960 | |
961 void GraphicsLayer::setContentsNeedsDisplay() | 949 void GraphicsLayer::setContentsNeedsDisplay() |
962 { | 950 { |
963 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { | 951 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { |
964 contentsLayer->invalidate(); | 952 contentsLayer->invalidate(); |
965 addRepaintRect(contentsRect()); | 953 addRepaintRect(contentsRect()); |
966 } | 954 } |
967 } | 955 } |
968 | 956 |
969 void GraphicsLayer::setNeedsDisplay() | 957 void GraphicsLayer::setNeedsDisplay() |
970 { | 958 { |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 #ifndef NDEBUG | 1211 #ifndef NDEBUG |
1224 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1212 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1225 { | 1213 { |
1226 if (!layer) | 1214 if (!layer) |
1227 return; | 1215 return; |
1228 | 1216 |
1229 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); | 1217 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); |
1230 fprintf(stderr, "%s\n", output.utf8().data()); | 1218 fprintf(stderr, "%s\n", output.utf8().data()); |
1231 } | 1219 } |
1232 #endif | 1220 #endif |
OLD | NEW |