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

Unified Diff: Source/core/rendering/RenderReplica.cpp

Issue 602973005: Move painting code from RenderReplica to ReplicaPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Created 6 years, 3 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/core/paint/ReplicaPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderReplica.cpp
diff --git a/Source/core/rendering/RenderReplica.cpp b/Source/core/rendering/RenderReplica.cpp
index 43352f14275ce6195afd3828c7f90a4dca62728a..eed0cfc102774c3f98f50da14b933bdcdc3908ed 100644
--- a/Source/core/rendering/RenderReplica.cpp
+++ b/Source/core/rendering/RenderReplica.cpp
@@ -29,6 +29,7 @@
#include "config.h"
#include "core/rendering/RenderReplica.h"
+#include "core/paint/ReplicaPainter.h"
#include "core/rendering/GraphicsContextAnnotator.h"
#include "core/rendering/RenderLayer.h"
@@ -72,22 +73,7 @@ void RenderReplica::computePreferredLogicalWidths()
void RenderReplica::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
-
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseMask)
- return;
-
- LayoutPoint adjustedPaintOffset = paintOffset + location();
-
- if (paintInfo.phase == PaintPhaseForeground) {
- // Turn around and paint the parent layer. Use temporary clipRects, so that the layer doesn't end up caching clip rects
- // computing using the wrong rootLayer
- RenderLayer* rootPaintingLayer = layer()->transform() ? layer()->parent() : layer()->enclosingTransformedAncestor();
- LayerPaintingInfo paintingInfo(rootPaintingLayer, paintInfo.rect, PaintBehaviorNormal, LayoutSize(), 0);
- PaintLayerFlags flags = PaintLayerHaveTransparency | PaintLayerAppliedTransform | PaintLayerUncachedClipRects | PaintLayerPaintingReflection;
- layer()->parent()->paintLayer(paintInfo.context, paintingInfo, flags);
- } else if (paintInfo.phase == PaintPhaseMask)
- paintMask(paintInfo, adjustedPaintOffset);
+ ReplicaPainter(*this).paint(paintInfo, paintOffset);
}
} // namespace blink
« no previous file with comments | « Source/core/paint/ReplicaPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698