Delete RenderLayerRepainter.

It's dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/795843008
This commit is contained in:
Ojan Vafai 2015-01-09 17:44:40 -08:00
parent f5239bbcca
commit 7d4c460653
5 changed files with 0 additions and 191 deletions

View File

@ -1142,8 +1142,6 @@ sky_core_files = [
"rendering/RenderLayerFilterInfo.h",
"rendering/RenderLayerModelObject.cpp",
"rendering/RenderLayerModelObject.h",
"rendering/RenderLayerRepainter.cpp",
"rendering/RenderLayerRepainter.h",
"rendering/RenderLayerScrollableArea.cpp",
"rendering/RenderLayerScrollableArea.h",
"rendering/RenderLayerStackingNode.cpp",

View File

@ -101,7 +101,6 @@ RenderLayer::RenderLayer(RenderLayerModelObject* renderer, LayerType type)
, m_last(0)
, m_staticInlinePosition(0)
, m_staticBlockPosition(0)
, m_paintInvalidator(*renderer)
, m_clipper(*renderer)
{
updateStackingNode();

View File

@ -49,7 +49,6 @@
#include "sky/engine/core/rendering/RenderBox.h"
#include "sky/engine/core/rendering/RenderLayerClipper.h"
#include "sky/engine/core/rendering/RenderLayerFilterInfo.h"
#include "sky/engine/core/rendering/RenderLayerRepainter.h"
#include "sky/engine/core/rendering/RenderLayerScrollableArea.h"
#include "sky/engine/core/rendering/RenderLayerStackingNode.h"
#include "sky/engine/core/rendering/RenderLayerStackingNodeIterator.h"
@ -277,7 +276,6 @@ public:
// FIXME: This should probably return a ScrollableArea but a lot of internal methods are mistakenly exposed.
RenderLayerScrollableArea* scrollableArea() const { return m_scrollableArea.get(); }
RenderLayerRepainter& paintInvalidator() { return m_paintInvalidator; }
RenderLayerClipper& clipper() { return m_clipper; }
const RenderLayerClipper& clipper() const { return m_clipper; }
@ -554,7 +552,6 @@ private:
OwnPtr<RenderLayerScrollableArea> m_scrollableArea;
RenderLayerRepainter m_paintInvalidator;
RenderLayerClipper m_clipper; // FIXME: Lazily allocate?
OwnPtr<RenderLayerStackingNode> m_stackingNode;

View File

@ -1,112 +0,0 @@
/*
* Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
*
* Portions are Copyright (C) 1998 Netscape Communications Corporation.
*
* Other contributors:
* Robert O'Callahan <roc+@cs.cmu.edu>
* David Baron <dbaron@fas.harvard.edu>
* Christian Biesinger <cbiesinger@web.de>
* Randall Jesup <rjesup@wgate.com>
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
* Josh Soref <timeless@mac.com>
* Boris Zbarsky <bzbarsky@mit.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Alternatively, the contents of this file may be used under the terms
* of either the Mozilla Public License Version 1.1, found at
* http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public
* License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html
* (the "GPL"), in which case the provisions of the MPL or the GPL are
* applicable instead of those above. If you wish to allow use of your
* version of this file only under the terms of one of those two
* licenses (the MPL or the GPL) and not to allow others to use your
* version of this file under the LGPL, indicate your decision by
* deletingthe provisions above and replace them with the notice and
* other provisions required by the MPL or the GPL, as the case may be.
* If you do not delete the provisions above, a recipient may use your
* version of this file under any of the LGPL, the MPL or the GPL.
*/
#include "sky/engine/config.h"
#include "sky/engine/core/rendering/RenderLayerRepainter.h"
#include "sky/engine/core/rendering/FilterEffectRenderer.h"
#include "sky/engine/core/rendering/RenderLayer.h"
#include "sky/engine/core/rendering/RenderView.h"
namespace blink {
RenderLayerRepainter::RenderLayerRepainter(RenderLayerModelObject& renderer)
: m_renderer(renderer)
{
}
void RenderLayerRepainter::computePaintInvalidationRectsIncludingNonCompositingDescendants()
{
// FIXME: boundsRectForPaintInvalidation() has to walk up the parent chain
// for every layer to compute the rects. We should make this more efficient.
// FIXME: it's wrong to call this when layout is not up-to-date, which we do.
m_renderer.setPreviousPaintInvalidationRect(m_renderer.boundsRectForPaintInvalidation(m_renderer.containerForPaintInvalidation()));
// FIXME: We are only updating the paint invalidation bounds but not
// the positionFromPaintInvalidationContainer. This means that we may
// forcing a full invaliation of the new position. Is this really correct?
for (RenderLayer* layer = m_renderer.layer()->firstChild(); layer; layer = layer->nextSibling()) {
layer->paintInvalidator().computePaintInvalidationRectsIncludingNonCompositingDescendants();
}
}
void RenderLayerRepainter::setFilterBackendNeedsPaintInvalidationInRect(const LayoutRect& rect)
{
if (rect.isEmpty())
return;
LayoutRect rectForPaintInvalidation = rect;
ASSERT(m_renderer.layer()->filterInfo());
RenderLayer* parentLayer = enclosingFilterPaintInvalidationLayer();
ASSERT(parentLayer);
FloatQuad paintInvalidationQuad(rectForPaintInvalidation);
LayoutRect parentLayerRect = m_renderer.localToContainerQuad(paintInvalidationQuad, parentLayer->renderer()).enclosingBoundingBox();
if (parentLayerRect.isEmpty())
return;
if (parentLayer->paintsWithFilters()) {
parentLayer->paintInvalidator().setFilterBackendNeedsPaintInvalidationInRect(parentLayerRect);
return;
}
if (parentLayer->isRootLayer()) {
RenderView* view = toRenderView(parentLayer->renderer());
view->invalidatePaintForRectangle(parentLayerRect);
return;
}
ASSERT_NOT_REACHED();
}
RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const
{
for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent()) {
if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilters()) || curr->isRootLayer())
return const_cast<RenderLayer*>(curr);
}
return 0;
}
} // namespace blink

View File

@ -1,73 +0,0 @@
/*
* Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
* Copyright (C) 2013 Intel Corporation. All rights reserved.
*
* Portions are Copyright (C) 1998 Netscape Communications Corporation.
*
* Other contributors:
* Robert O'Callahan <roc+@cs.cmu.edu>
* David Baron <dbaron@fas.harvard.edu>
* Christian Biesinger <cbiesinger@web.de>
* Randall Jesup <rjesup@wgate.com>
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
* Josh Soref <timeless@mac.com>
* Boris Zbarsky <bzbarsky@mit.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Alternatively, the contents of this file may be used under the terms
* of either the Mozilla Public License Version 1.1, found at
* http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public
* License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html
* (the "GPL"), in which case the provisions of the MPL or the GPL are
* applicable instead of those above. If you wish to allow use of your
* version of this file only under the terms of one of those two
* licenses (the MPL or the GPL) and not to allow others to use your
* version of this file under the LGPL, indicate your decision by
* deletingthe provisions above and replace them with the notice and
* other provisions required by the MPL or the GPL, as the case may be.
* If you do not delete the provisions above, a recipient may use your
* version of this file under any of the LGPL, the MPL or the GPL.
*/
#ifndef SKY_ENGINE_CORE_RENDERING_RENDERLAYERREPAINTER_H_
#define SKY_ENGINE_CORE_RENDERING_RENDERLAYERREPAINTER_H_
#include "sky/engine/platform/geometry/LayoutRect.h"
#include "sky/engine/wtf/Noncopyable.h"
namespace blink {
class RenderLayer;
class RenderLayerModelObject;
class RenderLayerRepainter {
WTF_MAKE_NONCOPYABLE(RenderLayerRepainter);
public:
RenderLayerRepainter(RenderLayerModelObject&);
void computePaintInvalidationRectsIncludingNonCompositingDescendants();
void setFilterBackendNeedsPaintInvalidationInRect(const LayoutRect&);
private:
RenderLayer* enclosingFilterPaintInvalidationLayer() const;
RenderLayerModelObject& m_renderer;
};
} // namespace blink
#endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYERREPAINTER_H_