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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInfo.h

Issue 2196583002: Paint local background colors onto foreground layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blend mode is still opaque. Created 4 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Creates a PaintInfo for painting descendants. See comments about the pain t phases 74 // Creates a PaintInfo for painting descendants. See comments about the pain t phases
75 // in PaintPhase.h for details. 75 // in PaintPhase.h for details.
76 PaintInfo forDescendants() const 76 PaintInfo forDescendants() const
77 { 77 {
78 PaintInfo result(*this); 78 PaintInfo result(*this);
79 if (phase == PaintPhaseDescendantOutlinesOnly) 79 if (phase == PaintPhaseDescendantOutlinesOnly)
80 result.phase = PaintPhaseOutline; 80 result.phase = PaintPhaseOutline;
81 else if (phase == PaintPhaseDescendantBlockBackgroundsOnly) 81 else if (phase == PaintPhaseDescendantBlockBackgroundsOnly)
82 result.phase = PaintPhaseBlockBackground; 82 result.phase = PaintPhaseBlockBackground;
83 result.m_paintFlags &= ~PaintLayerPaintingBackgroundOntoForeground;
chrishtr 2016/07/29 21:04:34 Can you just reuse paintRootBackgroundOnly() inste
flackr 2016/08/02 16:58:14 Done.
flackr 2016/08/02 18:37:03 Hmm, painting with RootBackgroundOnly and then aga
83 return result; 84 return result;
84 } 85 }
85 86
86 bool isRenderingClipPathAsMaskImage() const { return m_paintFlags & PaintLay erPaintingRenderingClipPathAsMask; } 87 bool isRenderingClipPathAsMaskImage() const { return m_paintFlags & PaintLay erPaintingRenderingClipPathAsMask; }
87 88
88 bool skipRootBackground() const { return m_paintFlags & PaintLayerPaintingSk ipRootBackground; } 89 bool skipRootBackground() const { return m_paintFlags & PaintLayerPaintingSk ipRootBackground; }
89 bool paintRootBackgroundOnly() const { return m_paintFlags & PaintLayerPaint ingRootBackgroundOnly; } 90 bool paintRootBackgroundOnly() const { return m_paintFlags & PaintLayerPaint ingRootBackgroundOnly; }
90 91
91 bool isPrinting() const { return m_globalPaintFlags & GlobalPaintPrinting; } 92 bool isPrinting() const { return m_globalPaintFlags & GlobalPaintPrinting; }
92 93
(...skipping 10 matching lines...) Expand all
103 void updateCullRect(const AffineTransform& localToParentTransform); 104 void updateCullRect(const AffineTransform& localToParentTransform);
104 105
105 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout layout/. 106 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout layout/.
106 GraphicsContext& context; 107 GraphicsContext& context;
107 PaintPhase phase; 108 PaintPhase phase;
108 109
109 private: 110 private:
110 CullRect m_cullRect; 111 CullRect m_cullRect;
111 const LayoutBoxModelObject* m_paintContainer; // the box model object that o riginates the current painting 112 const LayoutBoxModelObject* m_paintContainer; // the box model object that o riginates the current painting
112 113
113 const PaintLayerFlags m_paintFlags; 114 PaintLayerFlags m_paintFlags;
114 const GlobalPaintFlags m_globalPaintFlags; 115 const GlobalPaintFlags m_globalPaintFlags;
115 116
116 // TODO(chrishtr): temporary while we implement CullRect everywhere. 117 // TODO(chrishtr): temporary while we implement CullRect everywhere.
117 friend class SVGPaintContext; 118 friend class SVGPaintContext;
118 friend class SVGShapePainter; 119 friend class SVGShapePainter;
119 }; 120 };
120 121
121 } // namespace blink 122 } // namespace blink
122 123
123 #endif // PaintInfo_h 124 #endif // PaintInfo_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698