| OLD | NEW | 
|   1 // Copyright 2014 The Chromium Authors. All rights reserved. |   1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
|   2 // Use of this source code is governed by a BSD-style license that can be |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #ifndef BoxPainter_h |   5 #ifndef BoxPainter_h | 
|   6 #define BoxPainter_h |   6 #define BoxPainter_h | 
|   7  |   7  | 
|   8 #include "core/layout/LayoutBoxModelObject.h" |   8 #include "core/layout/LayoutBoxModelObject.h" | 
|   9 #include "core/paint/ObjectPainter.h" |   9 #include "core/paint/ObjectPainter.h" | 
|  10 #include "wtf/Allocator.h" |  10 #include "wtf/Allocator.h" | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
|  31     typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList; |  31     typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList; | 
|  32     // Returns true if the result fill layers have non-associative blending or c
    ompositing mode. |  32     // Returns true if the result fill layers have non-associative blending or c
    ompositing mode. | 
|  33     // (i.e. The rendering will be different without creating isolation group by
     context.saveLayer().) |  33     // (i.e. The rendering will be different without creating isolation group by
     context.saveLayer().) | 
|  34     // Note that the output list will be in top-bottom order. |  34     // Note that the output list will be in top-bottom order. | 
|  35     bool calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList &revers
    edPaintList, const FillLayer&); |  35     bool calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList &revers
    edPaintList, const FillLayer&); | 
|  36  |  36  | 
|  37     void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
     LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode =
     SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullptr); |  37     void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
     LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode =
     SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullptr); | 
|  38     void paintMaskImages(const PaintInfo&, const LayoutRect&); |  38     void paintMaskImages(const PaintInfo&, const LayoutRect&); | 
|  39     void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin
    t&, const LayoutRect&); |  39     void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin
    t&, const LayoutRect&); | 
|  40     static void paintFillLayerExtended(const LayoutBoxModelObject&, const PaintI
    nfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidanc
    e, const InlineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode:
    :Mode = SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullpt
    r); |  40     static void paintFillLayerExtended(const LayoutBoxModelObject&, const PaintI
    nfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidanc
    e, const InlineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode:
    :Mode = SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullpt
    r); | 
|  41     static InterpolationQuality chooseInterpolationQuality(const LayoutObject&, 
    GraphicsContext*, Image*, const void*, const LayoutSize&); |  41     static InterpolationQuality chooseInterpolationQuality(const LayoutObject&, 
    Image*, const void*, const LayoutSize&); | 
|  42     static bool paintNinePieceImage(const LayoutBoxModelObject&, GraphicsContext
    *, const LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::M
    ode = SkXfermode::kSrcOver_Mode); |  42     static bool paintNinePieceImage(const LayoutBoxModelObject&, GraphicsContext
    &, const LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::M
    ode = SkXfermode::kSrcOver_Mode); | 
|  43     static void paintBorder(const LayoutBoxModelObject&, const PaintInfo&, const
     LayoutRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNo
    ne, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); |  43     static void paintBorder(const LayoutBoxModelObject&, const PaintInfo&, const
     LayoutRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNo
    ne, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); | 
|  44     static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput
    edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi
    ghtEdge = true); |  44     static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput
    edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi
    ghtEdge = true); | 
|  45     static bool shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&, 
    const Document&); |  45     static bool shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&, 
    const Document&); | 
|  46  |  46  | 
|  47 private: |  47 private: | 
|  48     void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg
    roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); |  48     void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg
    roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); | 
|  49     void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const 
    LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, const LayoutObject* bac
    kgroundObject = nullptr); |  49     void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const 
    LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, const LayoutObject* bac
    kgroundObject = nullptr); | 
|  50     static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const
     LayoutObject&, const LayoutRect&, BackgroundBleedAvoidance, const InlineFlowBox
    *, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
    ; |  50     static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const
     LayoutObject&, const LayoutRect&, BackgroundBleedAvoidance, const InlineFlowBox
    *, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge)
    ; | 
|  51     static FloatRoundedRect getBackgroundRoundedRect(const LayoutObject&, const 
    LayoutRect&, const InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineB
    oxHeight, |  51     static FloatRoundedRect getBackgroundRoundedRect(const LayoutObject&, const 
    LayoutRect&, const InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineB
    oxHeight, | 
|  52         bool includeLogicalLeftEdge, bool includeLogicalRightEdge); |  52         bool includeLogicalLeftEdge, bool includeLogicalRightEdge); | 
|  53     static void applyBoxShadowForBackground(GraphicsContext*, const LayoutObject
    &); |  53     static void applyBoxShadowForBackground(GraphicsContext&, const LayoutObject
    &); | 
|  54  |  54  | 
|  55     LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); |  55     LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); | 
|  56  |  56  | 
|  57     const LayoutBox& m_layoutBox; |  57     const LayoutBox& m_layoutBox; | 
|  58 }; |  58 }; | 
|  59  |  59  | 
|  60 } // namespace blink |  60 } // namespace blink | 
|  61  |  61  | 
|  62 #endif |  62 #endif | 
| OLD | NEW |