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

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

Issue 453033005: Remove RenderLayerFilterInfo::m_dirtySourceRect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 // Blending operations must be performed only with the nearest ancestor stac king context. 1823 // Blending operations must be performed only with the nearest ancestor stac king context.
1824 // Note that there is no need to create a transparency layer if we're painti ng the root. 1824 // Note that there is no need to create a transparency layer if we're painti ng the root.
1825 bool createTransparencyLayerForBlendMode = !renderer()->isDocumentElement() && m_stackingNode->isStackingContext() && m_blendInfo.childLayerHasBlendMode(); 1825 bool createTransparencyLayerForBlendMode = !renderer()->isDocumentElement() && m_stackingNode->isStackingContext() && m_blendInfo.childLayerHasBlendMode();
1826 1826
1827 if (createTransparencyLayerForBlendMode) 1827 if (createTransparencyLayerForBlendMode)
1828 beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.pa intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior); 1828 beginTransparencyLayers(context, paintingInfo.rootLayer, paintingInfo.pa intDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo.paintBehavior);
1829 1829
1830 LayerPaintingInfo localPaintingInfo(paintingInfo); 1830 LayerPaintingInfo localPaintingInfo(paintingInfo);
1831 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte rs()); 1831 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte rs());
1832 if (filterPainter.haveFilterEffect()) { 1832 if (filterPainter.haveFilterEffect()) {
1833 RenderLayerFilterInfo* filterInfo = this->filterInfo(); 1833 ASSERT(this->filterInfo());
1834 ASSERT(filterInfo);
1835 LayoutRect filterRepaintRect = filterInfo->dirtySourceRect();
1836 filterRepaintRect.move(offsetFromRoot.x(), offsetFromRoot.y());
1837 1834
1838 if (!rootRelativeBoundsComputed) 1835 if (!rootRelativeBoundsComputed)
1839 rootRelativeBounds = physicalBoundingBoxIncludingReflectionAndStacki ngChildren(paintingInfo.rootLayer, offsetFromRoot); 1836 rootRelativeBounds = physicalBoundingBoxIncludingReflectionAndStacki ngChildren(paintingInfo.rootLayer, offsetFromRoot);
1840 1837
1841 if (filterPainter.prepareFilterEffect(this, rootRelativeBounds, painting Info.paintDirtyRect, filterRepaintRect)) { 1838 if (filterPainter.prepareFilterEffect(this, rootRelativeBounds, painting Info.paintDirtyRect)) {
1842 // Now we know for sure, that the source image will be updated, so w e can revert our tracking repaint rect back to zero.
1843 filterInfo->resetDirtySourceRect();
1844
1845 // Rewire the old context to a memory buffer, so that we can capture the contents of the layer. 1839 // Rewire the old context to a memory buffer, so that we can capture the contents of the layer.
1846 // NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer 1840 // NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer
1847 // on the original context and avoid duplicating "beginFilterEffect" after each transparency layer call. Also, note that 1841 // on the original context and avoid duplicating "beginFilterEffect" after each transparency layer call. Also, note that
1848 // beginTransparencyLayers will only create a single lazy transparen cy layer, even though it is called twice in this method. 1842 // beginTransparencyLayers will only create a single lazy transparen cy layer, even though it is called twice in this method.
1849 context = filterPainter.beginFilterEffect(context); 1843 context = filterPainter.beginFilterEffect(context);
1850 1844
1851 // Check that we didn't fail to allocate the graphics context for th e offscreen buffer. 1845 // Check that we didn't fail to allocate the graphics context for th e offscreen buffer.
1852 if (filterPainter.hasStartedFilterEffect()) { 1846 if (filterPainter.hasStartedFilterEffect()) {
1853 localPaintingInfo.paintDirtyRect = filterPainter.repaintRect(); 1847 localPaintingInfo.paintDirtyRect = filterPainter.repaintRect();
1854 // If the filter needs the full source image, we need to avoid u sing the clip rectangles. 1848 // If the filter needs the full source image, we need to avoid u sing the clip rectangles.
(...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 } 3739 }
3746 } 3740 }
3747 3741
3748 void showLayerTree(const blink::RenderObject* renderer) 3742 void showLayerTree(const blink::RenderObject* renderer)
3749 { 3743 {
3750 if (!renderer) 3744 if (!renderer)
3751 return; 3745 return;
3752 showLayerTree(renderer->enclosingLayer()); 3746 showLayerTree(renderer->enclosingLayer());
3753 } 3747 }
3754 #endif 3748 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/FilterEffectRenderer.cpp ('k') | Source/core/rendering/RenderLayerFilterInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698