| OLD | NEW |
| 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 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3028 !GetLayoutObject().View()->GetFrame()->ShouldThrottleRendering()) | 3028 !GetLayoutObject().View()->GetFrame()->ShouldThrottleRendering()) |
| 3029 paint_info.paint_layer->GetLayoutObject().AssertSubtreeIsLaidOut(); | 3029 paint_info.paint_layer->GetLayoutObject().AssertSubtreeIsLaidOut(); |
| 3030 #endif | 3030 #endif |
| 3031 | 3031 |
| 3032 float device_scale_factor = blink::DeviceScaleFactorDeprecated( | 3032 float device_scale_factor = blink::DeviceScaleFactorDeprecated( |
| 3033 paint_info.paint_layer->GetLayoutObject().GetFrame()); | 3033 paint_info.paint_layer->GetLayoutObject().GetFrame()); |
| 3034 context.SetDeviceScaleFactor(device_scale_factor); | 3034 context.SetDeviceScaleFactor(device_scale_factor); |
| 3035 | 3035 |
| 3036 if (paint_info.paint_layer->GetCompositingState() != | 3036 if (paint_info.paint_layer->GetCompositingState() != |
| 3037 kPaintsIntoGroupedBacking) { | 3037 kPaintsIntoGroupedBacking) { |
| 3038 LayoutSize sub_pixel_accumulation = |
| 3039 paint_info.paint_layer->SubpixelAccumulation(); |
| 3040 if (paint_layer_flags & kPaintLayerPaintingCompositingScrollingPhase) { |
| 3041 // The composited scrolling contents layer position rounds the subpixel |
| 3042 // accumulation. |
| 3043 sub_pixel_accumulation = |
| 3044 LayoutSize(RoundedIntSize(sub_pixel_accumulation)); |
| 3045 } |
| 3038 // FIXME: GraphicsLayers need a way to split for multicol. | 3046 // FIXME: GraphicsLayers need a way to split for multicol. |
| 3039 PaintLayerPaintingInfo painting_info( | 3047 PaintLayerPaintingInfo painting_info( |
| 3040 paint_info.paint_layer, LayoutRect(dirty_rect), kGlobalPaintNormalPhase, | 3048 paint_info.paint_layer, LayoutRect(dirty_rect), kGlobalPaintNormalPhase, |
| 3041 paint_info.paint_layer->SubpixelAccumulation()); | 3049 sub_pixel_accumulation); |
| 3042 PaintLayerPainter(*paint_info.paint_layer) | 3050 PaintLayerPainter(*paint_info.paint_layer) |
| 3043 .PaintLayerContents(context, painting_info, paint_layer_flags); | 3051 .PaintLayerContents(context, painting_info, paint_layer_flags); |
| 3044 | 3052 |
| 3045 if (paint_info.paint_layer->ContainsDirtyOverlayScrollbars()) | 3053 if (paint_info.paint_layer->ContainsDirtyOverlayScrollbars()) |
| 3046 PaintLayerPainter(*paint_info.paint_layer) | 3054 PaintLayerPainter(*paint_info.paint_layer) |
| 3047 .PaintLayerContents( | 3055 .PaintLayerContents( |
| 3048 context, painting_info, | 3056 context, painting_info, |
| 3049 paint_layer_flags | kPaintLayerPaintingOverlayScrollbars); | 3057 paint_layer_flags | kPaintLayerPaintingOverlayScrollbars); |
| 3050 } else { | 3058 } else { |
| 3051 PaintLayerPaintingInfo painting_info( | 3059 PaintLayerPaintingInfo painting_info( |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3604 } else if (graphics_layer == decoration_outline_layer_.get()) { | 3612 } else if (graphics_layer == decoration_outline_layer_.get()) { |
| 3605 name = "Decoration Layer"; | 3613 name = "Decoration Layer"; |
| 3606 } else { | 3614 } else { |
| 3607 NOTREACHED(); | 3615 NOTREACHED(); |
| 3608 } | 3616 } |
| 3609 | 3617 |
| 3610 return name; | 3618 return name; |
| 3611 } | 3619 } |
| 3612 | 3620 |
| 3613 } // namespace blink | 3621 } // namespace blink |
| OLD | NEW |