Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: Source/core/rendering/RenderPart.cpp

Issue 302083002: Always give RenderParts a RenderLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add win/mac needsrebaselines Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698