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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 2881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 2892
2893 IntSize offset = paintInfo.offsetFromLayoutObject; 2893 IntSize offset = paintInfo.offsetFromLayoutObject;
2894 AffineTransform translation; 2894 AffineTransform translation;
2895 translation.translate(-offset.width(), -offset.height()); 2895 translation.translate(-offset.width(), -offset.height());
2896 TransformRecorder transformRecorder(context, graphicsLayer, translation); 2896 TransformRecorder transformRecorder(context, graphicsLayer, translation);
2897 2897
2898 // The dirtyRect is in the coords of the painting root. 2898 // The dirtyRect is in the coords of the painting root.
2899 IntRect dirtyRect(clip); 2899 IntRect dirtyRect(clip);
2900 dirtyRect.move(offset); 2900 dirtyRect.move(offset);
2901 2901
2902 if (paintLayerFlags & (PaintLayerPaintingOverflowContents | 2902 if (paintLayerFlags &
2903 PaintLayerPaintingAncestorClippingMaskPhase)) { 2903 (PaintLayerPaintingOverflowContents |
2904 PaintLayerPaintingAncestorClippingMaskPhase)) {
2904 dirtyRect.move( 2905 dirtyRect.move(
2905 roundedIntSize(paintInfo.paintLayer->subpixelAccumulation())); 2906 roundedIntSize(paintInfo.paintLayer->subpixelAccumulation()));
2906 } else { 2907 } else {
2907 LayoutRect bounds = paintInfo.compositedBounds; 2908 LayoutRect bounds = paintInfo.compositedBounds;
2908 bounds.move(paintInfo.paintLayer->subpixelAccumulation()); 2909 bounds.move(paintInfo.paintLayer->subpixelAccumulation());
2909 dirtyRect.intersect(pixelSnappedIntRect(bounds)); 2910 dirtyRect.intersect(pixelSnappedIntRect(bounds));
2910 } 2911 }
2911 2912
2912 #if DCHECK_IS_ON() 2913 #if DCHECK_IS_ON()
2913 if (!layoutObject()->view()->frame() || 2914 if (!layoutObject()->view()->frame() ||
(...skipping 30 matching lines...) Expand all
2944 // CompositedLayerMapping::localClipRectForSquashedLayer()). 2945 // CompositedLayerMapping::localClipRectForSquashedLayer()).
2945 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? 2946 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode?
2946 // FIXME: Combine similar code here and LayerClipRecorder. 2947 // FIXME: Combine similar code here and LayerClipRecorder.
2947 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); 2948 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer);
2948 context.getPaintController().createAndAppend<ClipDisplayItem>( 2949 context.getPaintController().createAndAppend<ClipDisplayItem>(
2949 graphicsLayer, DisplayItem::kClipLayerOverflowControls, dirtyRect); 2950 graphicsLayer, DisplayItem::kClipLayerOverflowControls, dirtyRect);
2950 2951
2951 PaintLayerPainter(*paintInfo.paintLayer) 2952 PaintLayerPainter(*paintInfo.paintLayer)
2952 .paint(context, paintingInfo, paintLayerFlags); 2953 .paint(context, paintingInfo, paintLayerFlags);
2953 context.getPaintController().endItem<EndClipDisplayItem>( 2954 context.getPaintController().endItem<EndClipDisplayItem>(
2954 graphicsLayer, DisplayItem::clipTypeToEndClipType( 2955 graphicsLayer,
2955 DisplayItem::kClipLayerOverflowControls)); 2956 DisplayItem::clipTypeToEndClipType(
2957 DisplayItem::kClipLayerOverflowControls));
2956 } 2958 }
2957 } 2959 }
2958 2960
2959 static void paintScrollbar(const Scrollbar* scrollbar, 2961 static void paintScrollbar(const Scrollbar* scrollbar,
2960 GraphicsContext& context, 2962 GraphicsContext& context,
2961 const IntRect& clip) { 2963 const IntRect& clip) {
2962 if (!scrollbar) 2964 if (!scrollbar)
2963 return; 2965 return;
2964 2966
2965 const IntRect& scrollbarRect = scrollbar->frameRect(); 2967 const IntRect& scrollbarRect = scrollbar->frameRect();
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
3482 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { 3484 } else if (graphicsLayer == m_decorationOutlineLayer.get()) {
3483 name = "Decoration Layer"; 3485 name = "Decoration Layer";
3484 } else { 3486 } else {
3485 ASSERT_NOT_REACHED(); 3487 ASSERT_NOT_REACHED();
3486 } 3488 }
3487 3489
3488 return name; 3490 return name;
3489 } 3491 }
3490 3492
3491 } // namespace blink 3493 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698