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

Side by Side Diff: Source/core/rendering/PaintInfo.h

Issue 143323014: *** DO NOT LAND *** Attempt to understand Regions complexity Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/LayoutState.cpp ('k') | Source/core/rendering/RegionOversetState.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 #include "platform/graphics/GraphicsContext.h" 33 #include "platform/graphics/GraphicsContext.h"
34 #include "platform/transforms/AffineTransform.h" 34 #include "platform/transforms/AffineTransform.h"
35 #include "wtf/HashMap.h" 35 #include "wtf/HashMap.h"
36 #include "wtf/ListHashSet.h" 36 #include "wtf/ListHashSet.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class RenderInline; 40 class RenderInline;
41 class RenderLayerModelObject; 41 class RenderLayerModelObject;
42 class RenderObject; 42 class RenderObject;
43 class RenderRegion;
44 class RenderWidget; 43 class RenderWidget;
45 44
46 typedef HashMap<RenderWidget*, IntRect> OverlapTestRequestMap; 45 typedef HashMap<RenderWidget*, IntRect> OverlapTestRequestMap;
47 46
48 /* 47 /*
49 * Paint the object and its children, clipped by (x|y|w|h). 48 * Paint the object and its children, clipped by (x|y|w|h).
50 * (tx|ty) is the calculated position of the parent 49 * (tx|ty) is the calculated position of the parent
51 */ 50 */
52 struct PaintInfo { 51 struct PaintInfo {
53 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne wPhase, PaintBehavior newPaintBehavior, 52 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne wPhase, PaintBehavior newPaintBehavior,
54 RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListHashSet <RenderInline*>* newOutlineObjects = 0, 53 RenderObject* newPaintingRoot = 0, ListHashSet<RenderInline*>* newOutlin eObjects = 0,
55 OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelOb ject* newPaintContainer = 0) 54 OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelOb ject* newPaintContainer = 0)
56 : context(newContext) 55 : context(newContext)
57 , rect(newRect) 56 , rect(newRect)
58 , phase(newPhase) 57 , phase(newPhase)
59 , paintBehavior(newPaintBehavior) 58 , paintBehavior(newPaintBehavior)
60 , paintingRoot(newPaintingRoot) 59 , paintingRoot(newPaintingRoot)
61 , renderRegion(region)
62 , overlapTestRequests(overlapTestRequests) 60 , overlapTestRequests(overlapTestRequests)
63 , m_paintContainer(newPaintContainer) 61 , m_paintContainer(newPaintContainer)
64 , m_outlineObjects(newOutlineObjects) 62 , m_outlineObjects(newOutlineObjects)
65 { 63 {
66 } 64 }
67 65
68 void updatePaintingRootForChildren(const RenderObject* renderer) 66 void updatePaintingRootForChildren(const RenderObject* renderer)
69 { 67 {
70 if (!paintingRoot) 68 if (!paintingRoot)
71 return; 69 return;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 103
106 ListHashSet<RenderInline*>* outlineObjects() { return m_outlineObjects; } 104 ListHashSet<RenderInline*>* outlineObjects() { return m_outlineObjects; }
107 void setOutlineObjects(ListHashSet<RenderInline*>* objects) { m_outlineObjec ts = objects; } 105 void setOutlineObjects(ListHashSet<RenderInline*>* objects) { m_outlineObjec ts = objects; }
108 106
109 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/. 107 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/.
110 GraphicsContext* context; 108 GraphicsContext* context;
111 IntRect rect; 109 IntRect rect;
112 PaintPhase phase; 110 PaintPhase phase;
113 PaintBehavior paintBehavior; 111 PaintBehavior paintBehavior;
114 RenderObject* paintingRoot; // used to draw just one element and its visual kids 112 RenderObject* paintingRoot; // used to draw just one element and its visual kids
115 RenderRegion* renderRegion;
116 OverlapTestRequestMap* overlapTestRequests; 113 OverlapTestRequestMap* overlapTestRequests;
117 114
118 private: 115 private:
119 116
120 const RenderLayerModelObject* m_paintContainer; // the layer object that ori ginates the current painting 117 const RenderLayerModelObject* m_paintContainer; // the layer object that ori ginates the current painting
121 ListHashSet<RenderInline*>* m_outlineObjects; // used to list outlines that should be painted by a block with inline children 118 ListHashSet<RenderInline*>* m_outlineObjects; // used to list outlines that should be painted by a block with inline children
122 }; 119 };
123 120
124 } // namespace WebCore 121 } // namespace WebCore
125 122
126 #endif // PaintInfo_h 123 #endif // PaintInfo_h
OLDNEW
« no previous file with comments | « Source/core/rendering/LayoutState.cpp ('k') | Source/core/rendering/RegionOversetState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698