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

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 335453002: Remove unused cruft from GraphicsLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove test file Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/web/tests/CompositedLayerMappingTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 40398e5aea8b0c4bc43ccb5469aed1d31eb629c4..6129a2e721fe347b557996cbb58f8afa24fb1ea7 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -82,7 +82,6 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
: m_client(client)
, m_backgroundColor(Color::transparent)
, m_opacity(1)
- , m_zPosition(0)
, m_blendMode(blink::WebBlendModeNormal)
, m_hasTransformOrigin(false)
, m_contentsOpaque(false)
@@ -95,7 +94,6 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_hasScrollParent(false)
, m_hasClipParent(false)
, m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
- , m_contentsOrientation(CompositingCoordinatesTopDown)
, m_parent(0)
, m_maskLayer(0)
, m_contentsClippingMaskLayer(0)
@@ -149,6 +147,8 @@ void GraphicsLayer::setParent(GraphicsLayer* layer)
m_parent = layer;
}
+#if ASSERT_ENABLED
+
bool GraphicsLayer::hasAncestor(GraphicsLayer* ancestor) const
{
for (GraphicsLayer* curr = parent(); curr; curr = curr->parent()) {
@@ -159,6 +159,8 @@ bool GraphicsLayer::hasAncestor(GraphicsLayer* ancestor) const
return false;
}
+#endif
+
bool GraphicsLayer::setChildren(const GraphicsLayerVector& newChildren)
{
// If the contents of the arrays are the same, nothing to do.
@@ -335,11 +337,6 @@ void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
m_client->paintContents(this, context, m_paintingPhase, clip);
}
-void GraphicsLayer::setZPosition(float position)
-{
- m_zPosition = position;
-}
-
void GraphicsLayer::updateChildList()
{
WebLayer* childHost = m_layer->layer();
@@ -687,30 +684,30 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeFlags fl
ts << ")\n";
}
- if ((flags & LayerTreeIncludesPaintingPhases) && paintingPhase()) {
+ if ((flags & LayerTreeIncludesPaintingPhases) && m_paintingPhase) {
writeIndent(ts, indent + 1);
ts << "(paintingPhases\n";
- if (paintingPhase() & GraphicsLayerPaintBackground) {
+ if (m_paintingPhase & GraphicsLayerPaintBackground) {
writeIndent(ts, indent + 2);
ts << "GraphicsLayerPaintBackground\n";
}
- if (paintingPhase() & GraphicsLayerPaintForeground) {
+ if (m_paintingPhase & GraphicsLayerPaintForeground) {
writeIndent(ts, indent + 2);
ts << "GraphicsLayerPaintForeground\n";
}
- if (paintingPhase() & GraphicsLayerPaintMask) {
+ if (m_paintingPhase & GraphicsLayerPaintMask) {
writeIndent(ts, indent + 2);
ts << "GraphicsLayerPaintMask\n";
}
- if (paintingPhase() & GraphicsLayerPaintChildClippingMask) {
+ if (m_paintingPhase & GraphicsLayerPaintChildClippingMask) {
writeIndent(ts, indent + 2);
ts << "GraphicsLayerPaintChildClippingMask\n";
}
- if (paintingPhase() & GraphicsLayerPaintOverflowContents) {
+ if (m_paintingPhase & GraphicsLayerPaintOverflowContents) {
writeIndent(ts, indent + 2);
ts << "GraphicsLayerPaintOverflowContents\n";
}
- if (paintingPhase() & GraphicsLayerPaintCompositedScroll) {
+ if (m_paintingPhase & GraphicsLayerPaintCompositedScroll) {
writeIndent(ts, indent + 2);
ts << "GraphicsLayerPaintCompositedScroll\n";
}
@@ -971,7 +968,7 @@ void GraphicsLayer::setContentsNeedsDisplay()
{
if (WebLayer* contentsLayer = contentsLayerIfRegistered()) {
contentsLayer->invalidate();
- addRepaintRect(contentsRect());
+ addRepaintRect(m_contentsRect);
}
}
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/web/tests/CompositedLayerMappingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698