OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 bool RenderBoxModelObject::hasAcceleratedCompositing() const | 97 bool RenderBoxModelObject::hasAcceleratedCompositing() const |
98 { | 98 { |
99 return view()->compositor()->hasAcceleratedCompositing(); | 99 return view()->compositor()->hasAcceleratedCompositing(); |
100 } | 100 } |
101 | 101 |
102 bool RenderBoxModelObject::startTransition(double timeOffset, CSSPropertyID prop
ertyId, const RenderStyle* fromStyle, const RenderStyle* toStyle) | 102 bool RenderBoxModelObject::startTransition(double timeOffset, CSSPropertyID prop
ertyId, const RenderStyle* fromStyle, const RenderStyle* toStyle) |
103 { | 103 { |
104 ASSERT(hasLayer()); | 104 ASSERT(hasLayer()); |
105 ASSERT(isComposited()); | 105 ASSERT(compositingState() == PaintsIntoOwnBacking); |
106 return layer()->compositedLayerMapping()->startTransition(timeOffset, proper
tyId, fromStyle, toStyle); | 106 return layer()->compositedLayerMapping()->startTransition(timeOffset, proper
tyId, fromStyle, toStyle); |
107 } | 107 } |
108 | 108 |
109 void RenderBoxModelObject::transitionPaused(double timeOffset, CSSPropertyID pro
pertyId) | 109 void RenderBoxModelObject::transitionPaused(double timeOffset, CSSPropertyID pro
pertyId) |
110 { | 110 { |
111 ASSERT(hasLayer()); | 111 ASSERT(hasLayer()); |
112 ASSERT(isComposited()); | 112 ASSERT(compositingState() == PaintsIntoOwnBacking); |
113 layer()->compositedLayerMapping()->transitionPaused(timeOffset, propertyId); | 113 layer()->compositedLayerMapping()->transitionPaused(timeOffset, propertyId); |
114 } | 114 } |
115 | 115 |
116 void RenderBoxModelObject::transitionFinished(CSSPropertyID propertyId) | 116 void RenderBoxModelObject::transitionFinished(CSSPropertyID propertyId) |
117 { | 117 { |
118 ASSERT(hasLayer()); | 118 ASSERT(hasLayer()); |
119 ASSERT(isComposited()); | 119 ASSERT(compositingState() == PaintsIntoOwnBacking); |
120 layer()->compositedLayerMapping()->transitionFinished(propertyId); | 120 layer()->compositedLayerMapping()->transitionFinished(propertyId); |
121 } | 121 } |
122 | 122 |
123 bool RenderBoxModelObject::startAnimation(double timeOffset, const CSSAnimationD
ata* animation, const KeyframeList& keyframes) | 123 bool RenderBoxModelObject::startAnimation(double timeOffset, const CSSAnimationD
ata* animation, const KeyframeList& keyframes) |
124 { | 124 { |
125 ASSERT(hasLayer()); | 125 ASSERT(hasLayer()); |
126 ASSERT(isComposited()); | 126 ASSERT(compositingState() == PaintsIntoOwnBacking); |
127 return layer()->compositedLayerMapping()->startAnimation(timeOffset, animati
on, keyframes); | 127 return layer()->compositedLayerMapping()->startAnimation(timeOffset, animati
on, keyframes); |
128 } | 128 } |
129 | 129 |
130 void RenderBoxModelObject::animationPaused(double timeOffset, const String& name
) | 130 void RenderBoxModelObject::animationPaused(double timeOffset, const String& name
) |
131 { | 131 { |
132 ASSERT(hasLayer()); | 132 ASSERT(hasLayer()); |
133 ASSERT(isComposited()); | 133 ASSERT(compositingState() == PaintsIntoOwnBacking); |
134 layer()->compositedLayerMapping()->animationPaused(timeOffset, name); | 134 layer()->compositedLayerMapping()->animationPaused(timeOffset, name); |
135 } | 135 } |
136 | 136 |
137 void RenderBoxModelObject::animationFinished(const String& name) | 137 void RenderBoxModelObject::animationFinished(const String& name) |
138 { | 138 { |
139 ASSERT(hasLayer()); | 139 ASSERT(hasLayer()); |
140 ASSERT(isComposited()); | 140 ASSERT(compositingState() == PaintsIntoOwnBacking); |
141 layer()->compositedLayerMapping()->animationFinished(name); | 141 layer()->compositedLayerMapping()->animationFinished(name); |
142 } | 142 } |
143 | 143 |
144 void RenderBoxModelObject::suspendAnimations(double time) | 144 void RenderBoxModelObject::suspendAnimations(double time) |
145 { | 145 { |
146 ASSERT(hasLayer()); | 146 ASSERT(hasLayer()); |
147 ASSERT(isComposited()); | 147 ASSERT(compositingState() == PaintsIntoOwnBacking); |
148 layer()->compositedLayerMapping()->suspendAnimations(time); | 148 layer()->compositedLayerMapping()->suspendAnimations(time); |
149 } | 149 } |
150 | 150 |
151 bool RenderBoxModelObject::shouldPaintAtLowQuality(GraphicsContext* context, Ima
ge* image, const void* layer, const LayoutSize& size) | 151 bool RenderBoxModelObject::shouldPaintAtLowQuality(GraphicsContext* context, Ima
ge* image, const void* layer, const LayoutSize& size) |
152 { | 152 { |
153 return ImageQualityController::imageQualityController()->shouldPaintAtLowQua
lity(context, this, image, layer, size); | 153 return ImageQualityController::imageQualityController()->shouldPaintAtLowQua
lity(context, this, image, layer, size); |
154 } | 154 } |
155 | 155 |
156 RenderBoxModelObject::RenderBoxModelObject(ContainerNode* node) | 156 RenderBoxModelObject::RenderBoxModelObject(ContainerNode* node) |
157 : RenderLayerModelObject(node) | 157 : RenderLayerModelObject(node) |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 | 978 |
979 bool RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates() const | 979 bool RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates() const |
980 { | 980 { |
981 if (!isRoot()) | 981 if (!isRoot()) |
982 return false; | 982 return false; |
983 | 983 |
984 if (view()->frameView() && view()->frameView()->paintBehavior() & PaintBehav
iorFlattenCompositingLayers) | 984 if (view()->frameView() && view()->frameView()->paintBehavior() & PaintBehav
iorFlattenCompositingLayers) |
985 return false; | 985 return false; |
986 | 986 |
987 RenderLayer* rootLayer = view()->layer(); | 987 RenderLayer* rootLayer = view()->layer(); |
988 if (!rootLayer || !rootLayer->isComposited()) | 988 if (!rootLayer || rootLayer->compositingState() == NotComposited) |
989 return false; | 989 return false; |
990 | 990 |
991 return rootLayer->compositedLayerMapping()->backgroundLayerPaintsFixedRootBa
ckground(); | 991 return rootLayer->compositedLayerMapping()->backgroundLayerPaintsFixedRootBa
ckground(); |
992 } | 992 } |
993 | 993 |
994 static inline int getSpace(int areaSize, int tileSize) | 994 static inline int getSpace(int areaSize, int tileSize) |
995 { | 995 { |
996 int numberOfTiles = areaSize / tileSize; | 996 int numberOfTiles = areaSize / tileSize; |
997 int space = -1; | 997 int space = -1; |
998 | 998 |
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2829 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2829 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
2830 for (RenderObject* child = startChild; child && child != endChild; ) { | 2830 for (RenderObject* child = startChild; child && child != endChild; ) { |
2831 // Save our next sibling as moveChildTo will clear it. | 2831 // Save our next sibling as moveChildTo will clear it. |
2832 RenderObject* nextSibling = child->nextSibling(); | 2832 RenderObject* nextSibling = child->nextSibling(); |
2833 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2833 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
2834 child = nextSibling; | 2834 child = nextSibling; |
2835 } | 2835 } |
2836 } | 2836 } |
2837 | 2837 |
2838 } // namespace WebCore | 2838 } // namespace WebCore |
OLD | NEW |