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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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) 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { 171 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) {
172 contentDocument = toHTMLFrameOwnerElement(fullscreenElement)->contentDoc ument(); 172 contentDocument = toHTMLFrameOwnerElement(fullscreenElement)->contentDoc ument();
173 if (!contentDocument) 173 if (!contentDocument)
174 return 0; 174 return 0;
175 fullscreenElement = Fullscreen::fullscreenElementFrom(*contentDocument); 175 fullscreenElement = Fullscreen::fullscreenElementFrom(*contentDocument);
176 } 176 }
177 // Get the current fullscreen element from the document. 177 // Get the current fullscreen element from the document.
178 fullscreenElement = Fullscreen::currentFullScreenElementFrom(*contentDocumen t); 178 fullscreenElement = Fullscreen::currentFullScreenElementFrom(*contentDocumen t);
179 if (!isHTMLVideoElement(fullscreenElement)) 179 if (!isHTMLVideoElement(fullscreenElement))
180 return 0; 180 return 0;
181 RenderObject* renderer = fullscreenElement->renderer(); 181 LayoutObject* renderer = fullscreenElement->renderer();
182 if (!renderer) 182 if (!renderer)
183 return 0; 183 return 0;
184 return toRenderVideo(renderer); 184 return toRenderVideo(renderer);
185 } 185 }
186 186
187 void LayerCompositor::updateIfNeededRecursive() 187 void LayerCompositor::updateIfNeededRecursive()
188 { 188 {
189 for (Frame* child = m_renderView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) { 189 for (Frame* child = m_renderView.frameView()->frame().tree().firstChild(); c hild; child = child->tree().nextSibling()) {
190 if (child->isLocalFrame()) 190 if (child->isLocalFrame())
191 toLocalFrame(child)->contentRenderer()->compositor()->updateIfNeeded Recursive(); 191 toLocalFrame(child)->contentRenderer()->compositor()->updateIfNeeded Recursive();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 ASSERT(!hasAcceleratedCompositing()); 296 ASSERT(!hasAcceleratedCompositing());
297 297
298 if (updateType >= CompositingUpdateAfterCompositingInputChange) 298 if (updateType >= CompositingUpdateAfterCompositingInputChange)
299 CompositingInputsUpdater(rootLayer()).update(); 299 CompositingInputsUpdater(rootLayer()).update();
300 300
301 #if ENABLE(ASSERT) 301 #if ENABLE(ASSERT)
302 CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(root Layer()); 302 CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(root Layer());
303 #endif 303 #endif
304 } 304 }
305 305
306 static void forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(RenderObject* renderer) 306 static void forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(LayoutObject* renderer)
307 { 307 {
308 // We clear the previous paint invalidation rect as it's wrong (paint invali ation container 308 // We clear the previous paint invalidation rect as it's wrong (paint invali ation container
309 // changed, ...). Forcing a full invalidation will make us recompute it. Als o we are not 309 // changed, ...). Forcing a full invalidation will make us recompute it. Als o we are not
310 // changing the previous position from our paint invalidation container, whi ch is fine as 310 // changing the previous position from our paint invalidation container, whi ch is fine as
311 // we want a full paint invalidation anyway. 311 // we want a full paint invalidation anyway.
312 renderer->setPreviousPaintInvalidationRect(LayoutRect()); 312 renderer->setPreviousPaintInvalidationRect(LayoutRect());
313 renderer->setShouldDoFullPaintInvalidation(); 313 renderer->setShouldDoFullPaintInvalidation();
314 314
315 for (RenderObject* child = renderer->slowFirstChild(); child; child = child- >nextSibling()) { 315 for (LayoutObject* child = renderer->slowFirstChild(); child; child = child- >nextSibling()) {
316 if (!child->isPaintInvalidationContainer()) 316 if (!child->isPaintInvalidationContainer())
317 forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(child); 317 forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(child);
318 } 318 }
319 } 319 }
320 320
321 321
322 void LayerCompositor::updateIfNeeded() 322 void LayerCompositor::updateIfNeeded()
323 { 323 {
324 CompositingUpdateType updateType = m_pendingUpdateType; 324 CompositingUpdateType updateType = m_pendingUpdateType;
325 m_pendingUpdateType = CompositingUpdateNone; 325 m_pendingUpdateType = CompositingUpdateNone;
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 } else if (graphicsLayer == m_scrollLayer.get()) { 1179 } else if (graphicsLayer == m_scrollLayer.get()) {
1180 name = "LocalFrame Scrolling Layer"; 1180 name = "LocalFrame Scrolling Layer";
1181 } else { 1181 } else {
1182 ASSERT_NOT_REACHED(); 1182 ASSERT_NOT_REACHED();
1183 } 1183 }
1184 1184
1185 return name; 1185 return name;
1186 } 1186 }
1187 1187
1188 } // namespace blink 1188 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/compositing/CompositingReasonFinder.cpp ('k') | Source/core/layout/line/BreakingContextInlineHeaders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698