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

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

Issue 1387923002: LayoutObject::invalidatePaintIfNeededForSynchronizedPainting() and plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class LayoutObject; 48 class LayoutObject;
49 49
50 struct PaintInfo { 50 struct PaintInfo {
51 ALLOW_ONLY_INLINE_ALLOCATION(); 51 ALLOW_ONLY_INLINE_ALLOCATION();
52 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne wPhase, GlobalPaintFlags globalPaintFlags, PaintLayerFlags paintFlags, 52 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne wPhase, GlobalPaintFlags globalPaintFlags, PaintLayerFlags paintFlags,
53 LayoutObject* newPaintingRoot = 0, const LayoutBoxModelObject* newPaintC ontainer = 0) 53 LayoutObject* newPaintingRoot = 0, const LayoutBoxModelObject* newPaintC ontainer = 0)
54 : context(newContext) 54 : context(newContext)
55 , rect(newRect) 55 , rect(newRect)
56 , phase(newPhase) 56 , phase(newPhase)
57 , paintingRoot(newPaintingRoot) 57 , paintingRoot(newPaintingRoot)
58 , paintInvalidationState(nullptr)
58 , m_paintContainer(newPaintContainer) 59 , m_paintContainer(newPaintContainer)
59 , m_paintFlags(paintFlags) 60 , m_paintFlags(paintFlags)
60 , m_globalPaintFlags(globalPaintFlags) 61 , m_globalPaintFlags(globalPaintFlags)
61 { 62 {
62 } 63 }
63 64
64 void updatePaintingRootForChildren(const LayoutObject* layoutObject) 65 void updatePaintingRootForChildren(const LayoutObject* layoutObject)
65 { 66 {
66 if (!paintingRoot) 67 if (!paintingRoot)
67 return; 68 return;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 { 103 {
103 if (rect != LayoutRect::infiniteIntRect()) 104 if (rect != LayoutRect::infiniteIntRect())
104 rect = localToParentTransform.inverse().mapRect(rect); 105 rect = localToParentTransform.inverse().mapRect(rect);
105 } 106 }
106 107
107 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout layout/. 108 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout layout/.
108 GraphicsContext* context; 109 GraphicsContext* context;
109 IntRect rect; // dirty rect used for culling non-intersecting layoutObjects 110 IntRect rect; // dirty rect used for culling non-intersecting layoutObjects
110 PaintPhase phase; 111 PaintPhase phase;
111 LayoutObject* paintingRoot; // used to draw just one element and its visual kids 112 LayoutObject* paintingRoot; // used to draw just one element and its visual kids
113 // TODO(wangxianzhu): Populate it.
114 PaintInvalidationState* paintInvalidationState;
112 115
113 private: 116 private:
114 const LayoutBoxModelObject* m_paintContainer; // the box model object that o riginates the current painting 117 const LayoutBoxModelObject* m_paintContainer; // the box model object that o riginates the current painting
115 118
116 const PaintLayerFlags m_paintFlags; 119 const PaintLayerFlags m_paintFlags;
117 const GlobalPaintFlags m_globalPaintFlags; 120 const GlobalPaintFlags m_globalPaintFlags;
118 }; 121 };
119 122
120 } // namespace blink 123 } // namespace blink
121 124
122 #endif // PaintInfo_h 125 #endif // PaintInfo_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698