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

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

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 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
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 4018 matching lines...) Expand 10 before | Expand all | Expand 10 after
4029 for (size_t i = 0; i < layerFragments.size(); ++i) { 4029 for (size_t i = 0; i < layerFragments.size(); ++i) {
4030 const LayerFragment& fragment = layerFragments.at(i); 4030 const LayerFragment& fragment = layerFragments.at(i);
4031 if (!fragment.shouldPaintContent || fragment.foregroundRect.isEmpty()) 4031 if (!fragment.shouldPaintContent || fragment.foregroundRect.isEmpty())
4032 continue; 4032 continue;
4033 4033
4034 if (shouldClip) 4034 if (shouldClip)
4035 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.foregroundRect); 4035 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, fragment.foregroundRect);
4036 4036
4037 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect .rect()), phase, paintBehavior, paintingRootForRenderer, localPaintingInfo.regio n, 0, 0, localPaintingInfo.rootLayer->renderer()); 4037 PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect .rect()), phase, paintBehavior, paintingRootForRenderer, localPaintingInfo.regio n, 0, 0, localPaintingInfo.rootLayer->renderer());
4038 if (phase == PaintPhaseForeground) 4038 if (phase == PaintPhaseForeground)
4039 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequest s; 4039 paintInfo.setOverlapTestRequests(localPaintingInfo.overlapTestReques ts);
4040 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + localPaintingInfo.subPixelAccumulation)); 4040 renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - r enderBoxLocation() + localPaintingInfo.subPixelAccumulation));
4041 4041
4042 if (shouldClip) 4042 if (shouldClip)
4043 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.fore groundRect); 4043 restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.fore groundRect);
4044 } 4044 }
4045 } 4045 }
4046 4046
4047 void RenderLayer::paintOutlineForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo, 4047 void RenderLayer::paintOutlineForFragments(const LayerFragments& layerFragments, GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
4048 PaintBehavior paintBehavior, RenderObject* paintingRootForRenderer) 4048 PaintBehavior paintBehavior, RenderObject* paintingRootForRenderer)
4049 { 4049 {
(...skipping 2316 matching lines...) Expand 10 before | Expand all | Expand 10 after
6366 } 6366 }
6367 } 6367 }
6368 6368
6369 void showLayerTree(const WebCore::RenderObject* renderer) 6369 void showLayerTree(const WebCore::RenderObject* renderer)
6370 { 6370 {
6371 if (!renderer) 6371 if (!renderer)
6372 return; 6372 return;
6373 showLayerTree(renderer->enclosingLayer()); 6373 showLayerTree(renderer->enclosingLayer());
6374 } 6374 }
6375 #endif 6375 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698