OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 if (includeSelf && isComposited()) | 953 if (includeSelf && isComposited()) |
954 return const_cast<RenderLayer*>(this); | 954 return const_cast<RenderLayer*>(this); |
955 | 955 |
956 for (const RenderLayer* curr = compositingContainer(this); curr; curr = comp
ositingContainer(curr)) { | 956 for (const RenderLayer* curr = compositingContainer(this); curr; curr = comp
ositingContainer(curr)) { |
957 if (curr->isComposited()) | 957 if (curr->isComposited()) |
958 return const_cast<RenderLayer*>(curr); | 958 return const_cast<RenderLayer*>(curr); |
959 } | 959 } |
960 | 960 |
961 return 0; | 961 return 0; |
962 } | 962 } |
963 | |
964 RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(bool includeSelf)
const | |
965 { | |
966 if (includeSelf && isComposited() && !backing()->paintsIntoCompositedAncesto
r()) | |
967 return const_cast<RenderLayer*>(this); | |
968 | |
969 for (const RenderLayer* curr = compositingContainer(this); curr; curr = comp
ositingContainer(curr)) { | |
970 if (curr->isComposited() && !curr->backing()->paintsIntoCompositedAncest
or()) | |
971 return const_cast<RenderLayer*>(curr); | |
972 } | |
973 | |
974 return 0; | |
975 } | |
976 #endif | 963 #endif |
977 | 964 |
978 #if ENABLE(CSS_FILTERS) | 965 #if ENABLE(CSS_FILTERS) |
979 RenderLayer* RenderLayer::enclosingFilterLayer(bool includeSelf) const | 966 RenderLayer* RenderLayer::enclosingFilterLayer(bool includeSelf) const |
980 { | 967 { |
981 const RenderLayer* curr = includeSelf ? this : parent(); | 968 const RenderLayer* curr = includeSelf ? this : parent(); |
982 for (; curr; curr = curr->parent()) { | 969 for (; curr; curr = curr->parent()) { |
983 if (curr->requiresFullLayerImageForFilters()) | 970 if (curr->requiresFullLayerImageForFilters()) |
984 return const_cast<RenderLayer*>(curr); | 971 return const_cast<RenderLayer*>(curr); |
985 } | 972 } |
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2879 const LayoutRect& paintDirtyRect, PaintBehavior paintBeh
avior, | 2866 const LayoutRect& paintDirtyRect, PaintBehavior paintBeh
avior, |
2880 RenderObject* paintingRoot, RenderRegion* region, Overla
pTestRequestMap* overlapTestRequests, | 2867 RenderObject* paintingRoot, RenderRegion* region, Overla
pTestRequestMap* overlapTestRequests, |
2881 PaintLayerFlags paintFlags) | 2868 PaintLayerFlags paintFlags) |
2882 { | 2869 { |
2883 #if USE(ACCELERATED_COMPOSITING) | 2870 #if USE(ACCELERATED_COMPOSITING) |
2884 if (isComposited()) { | 2871 if (isComposited()) { |
2885 // The updatingControlTints() painting pass goes through compositing lay
ers, | 2872 // The updatingControlTints() painting pass goes through compositing lay
ers, |
2886 // but we need to ensure that we don't cache clip rects computed with th
e wrong root in this case. | 2873 // but we need to ensure that we don't cache clip rects computed with th
e wrong root in this case. |
2887 if (context->updatingControlTints() || (paintBehavior & PaintBehaviorFla
ttenCompositingLayers)) | 2874 if (context->updatingControlTints() || (paintBehavior & PaintBehaviorFla
ttenCompositingLayers)) |
2888 paintFlags |= PaintLayerTemporaryClipRects; | 2875 paintFlags |= PaintLayerTemporaryClipRects; |
2889 else if (!backing()->paintsIntoWindow() && !backing()->paintsIntoComposi
tedAncestor() && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingRef
lection)) { | 2876 else if (!backing()->paintsIntoWindow() && !shouldDoSoftwarePaint(this,
paintFlags & PaintLayerPaintingReflection)) { |
2890 // If this RenderLayer should paint into its backing, that will be d
one via RenderLayerBacking::paintIntoLayer(). | 2877 // If this RenderLayer should paint into its backing, that will be d
one via RenderLayerBacking::paintIntoLayer(). |
2891 return; | 2878 return; |
2892 } | 2879 } |
2893 } | 2880 } |
2894 #endif | 2881 #endif |
2895 | 2882 |
2896 if (shouldSuppressPaintingLayer(this)) | 2883 if (shouldSuppressPaintingLayer(this)) |
2897 return; | 2884 return; |
2898 | 2885 |
2899 // If this layer is totally invisible then there is nothing to paint. | 2886 // If this layer is totally invisible then there is nothing to paint. |
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4938 } | 4925 } |
4939 } | 4926 } |
4940 | 4927 |
4941 void showLayerTree(const WebCore::RenderObject* renderer) | 4928 void showLayerTree(const WebCore::RenderObject* renderer) |
4942 { | 4929 { |
4943 if (!renderer) | 4930 if (!renderer) |
4944 return; | 4931 return; |
4945 showLayerTree(renderer->enclosingLayer()); | 4932 showLayerTree(renderer->enclosingLayer()); |
4946 } | 4933 } |
4947 #endif | 4934 #endif |
OLD | NEW |