| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
| 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 RenderPart::~RenderPart() | 47 RenderPart::~RenderPart() |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 LayerType RenderPart::layerTypeRequired() const | 51 LayerType RenderPart::layerTypeRequired() const |
| 52 { | 52 { |
| 53 LayerType type = RenderWidget::layerTypeRequired(); | 53 LayerType type = RenderWidget::layerTypeRequired(); |
| 54 if (type != NoLayer) | 54 if (type != NoLayer) |
| 55 return type; | 55 return type; |
| 56 | 56 return ForcedLayer; |
| 57 return requiresAcceleratedCompositing() ? NormalLayer : NoLayer; | |
| 58 } | 57 } |
| 59 | 58 |
| 60 bool RenderPart::requiresAcceleratedCompositing() const | 59 bool RenderPart::requiresAcceleratedCompositing() const |
| 61 { | 60 { |
| 62 // There are two general cases in which we can return true. First, if this i
s a plugin | 61 // There are two general cases in which we can return true. First, if this i
s a plugin |
| 63 // renderer and the plugin has a layer, then we need a layer. Second, if thi
s is | 62 // renderer and the plugin has a layer, then we need a layer. Second, if thi
s is |
| 64 // a renderer with a contentDocument and that document needs a layer, then w
e need | 63 // a renderer with a contentDocument and that document needs a layer, then w
e need |
| 65 // a layer. | 64 // a layer. |
| 66 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform
Layer()) | 65 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform
Layer()) |
| 67 return true; | 66 return true; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 130 } |
| 132 | 131 |
| 133 CompositingReasons RenderPart::additionalCompositingReasons(CompositingTriggerFl
ags) const | 132 CompositingReasons RenderPart::additionalCompositingReasons(CompositingTriggerFl
ags) const |
| 134 { | 133 { |
| 135 if (requiresAcceleratedCompositing()) | 134 if (requiresAcceleratedCompositing()) |
| 136 return CompositingReasonIFrame; | 135 return CompositingReasonIFrame; |
| 137 return CompositingReasonNone; | 136 return CompositingReasonNone; |
| 138 } | 137 } |
| 139 | 138 |
| 140 } | 139 } |
| OLD | NEW |