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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2559183005: Fix issue when background changes painting target layer (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // We can only paint the background onto the scrolling contents layer if 361 // We can only paint the background onto the scrolling contents layer if
362 // it would be visually correct and we are using composited scrolling meaning 362 // it would be visually correct and we are using composited scrolling meaning
363 // we have a scrolling contents layer to paint it into. 363 // we have a scrolling contents layer to paint it into.
364 bool shouldPaintOntoScrollingContentsLayer = 364 bool shouldPaintOntoScrollingContentsLayer =
365 m_owningLayer.canPaintBackgroundOntoScrollingContentsLayer() && 365 m_owningLayer.canPaintBackgroundOntoScrollingContentsLayer() &&
366 m_owningLayer.getScrollableArea()->usesCompositedScrolling(); 366 m_owningLayer.getScrollableArea()->usesCompositedScrolling();
367 if (shouldPaintOntoScrollingContentsLayer != 367 if (shouldPaintOntoScrollingContentsLayer !=
368 backgroundPaintsOntoScrollingContentsLayer()) { 368 backgroundPaintsOntoScrollingContentsLayer()) {
369 m_backgroundPaintsOntoScrollingContentsLayer = 369 m_backgroundPaintsOntoScrollingContentsLayer =
370 shouldPaintOntoScrollingContentsLayer; 370 shouldPaintOntoScrollingContentsLayer;
371 // If the background is no longer painted onto the scrolling contents layer 371 // The scrolling contents layer needs to be updated for changed
372 // the scrolling contents layer needs to be updated. If it is going to be 372 // m_backgroundPaintsOntoScrollingContentsLayer.
373 // painted onto the scrolling contents layer this update will be triggered 373 if (hasScrollingLayer())
374 // by LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect
375 if (hasScrollingLayer() && !shouldPaintOntoScrollingContentsLayer)
376 m_scrollingContentsLayer->setNeedsDisplay(); 374 m_scrollingContentsLayer->setNeedsDisplay();
377 } 375 }
378 } 376 }
379 377
380 void CompositedLayerMapping::updateContentsOpaque() { 378 void CompositedLayerMapping::updateContentsOpaque() {
381 if (isAcceleratedCanvas(layoutObject())) { 379 if (isAcceleratedCanvas(layoutObject())) {
382 // Determine whether the rendering context's external texture layer is 380 // Determine whether the rendering context's external texture layer is
383 // opaque. 381 // opaque.
384 CanvasRenderingContext* context = 382 CanvasRenderingContext* context =
385 toHTMLCanvasElement(layoutObject()->node())->renderingContext(); 383 toHTMLCanvasElement(layoutObject()->node())->renderingContext();
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
3251 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 3249 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
3252 name = "Scrolling Contents Layer"; 3250 name = "Scrolling Contents Layer";
3253 } else { 3251 } else {
3254 ASSERT_NOT_REACHED(); 3252 ASSERT_NOT_REACHED();
3255 } 3253 }
3256 3254
3257 return name; 3255 return name;
3258 } 3256 }
3259 3257
3260 } // namespace blink 3258 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/filter-invalidation-with-composited-container-change-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698