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

Side by Side Diff: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp

Issue 1293533005: HTMLPluginElement should use setNeedsCompositingUpdate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/html/HTMLPlugInElement.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return m_compositing; 99 return m_compositing;
100 } 100 }
101 101
102 void DeprecatedPaintLayerCompositor::setCompositingModeEnabled(bool enable) 102 void DeprecatedPaintLayerCompositor::setCompositingModeEnabled(bool enable)
103 { 103 {
104 if (enable == m_compositing) 104 if (enable == m_compositing)
105 return; 105 return;
106 106
107 m_compositing = enable; 107 m_compositing = enable;
108 108
109 // LayoutPart::requiresAcceleratedCompositing is used to determine self-pain tingness
110 // and bases it's return value for frames on the m_compositing bit here.
111 if (HTMLFrameOwnerElement* ownerElement = m_layoutView.document().ownerEleme nt()) {
112 if (LayoutPart* layoutObject = ownerElement->layoutPart())
113 layoutObject->layer()->updateSelfPaintingLayer();
114 }
115
116 if (m_compositing) 109 if (m_compositing)
117 ensureRootLayer(); 110 ensureRootLayer();
118 else 111 else
119 destroyRootLayer(); 112 destroyRootLayer();
120 113
121 // Compositing also affects the answer to LayoutIFrame::requiresAcceleratedC ompositing(), so 114 // Schedule an update in the parent frame so the <iframe>'s layer in the own er
122 // we need to schedule a style recalc in our parent document. 115 // document matches the compositing state here.
123 if (HTMLFrameOwnerElement* ownerElement = m_layoutView.document().ownerEleme nt()) 116 if (HTMLFrameOwnerElement* ownerElement = m_layoutView.document().ownerEleme nt())
124 ownerElement->setNeedsCompositingUpdate(); 117 ownerElement->setNeedsCompositingUpdate();
125 } 118 }
126 119
127 void DeprecatedPaintLayerCompositor::enableCompositingModeIfNeeded() 120 void DeprecatedPaintLayerCompositor::enableCompositingModeIfNeeded()
128 { 121 {
129 if (!m_rootShouldAlwaysCompositeDirty) 122 if (!m_rootShouldAlwaysCompositeDirty)
130 return; 123 return;
131 124
132 m_rootShouldAlwaysCompositeDirty = false; 125 m_rootShouldAlwaysCompositeDirty = false;
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 } else if (graphicsLayer == m_scrollLayer.get()) { 1201 } else if (graphicsLayer == m_scrollLayer.get()) {
1209 name = "LocalFrame Scrolling Layer"; 1202 name = "LocalFrame Scrolling Layer";
1210 } else { 1203 } else {
1211 ASSERT_NOT_REACHED(); 1204 ASSERT_NOT_REACHED();
1212 } 1205 }
1213 1206
1214 return name; 1207 return name;
1215 } 1208 }
1216 1209
1217 } // namespace blink 1210 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLPlugInElement.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698