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

Side by Side Diff: sky/engine/core/rendering/PaintInfo.h

Issue 953673002: Delete RenderLayerModelObject. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.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 18 matching lines...) Expand all
29 #include <limits> 29 #include <limits>
30 #include "sky/engine/platform/geometry/IntRect.h" 30 #include "sky/engine/platform/geometry/IntRect.h"
31 #include "sky/engine/platform/geometry/LayoutRect.h" 31 #include "sky/engine/platform/geometry/LayoutRect.h"
32 #include "sky/engine/platform/graphics/GraphicsContext.h" 32 #include "sky/engine/platform/graphics/GraphicsContext.h"
33 #include "sky/engine/platform/transforms/AffineTransform.h" 33 #include "sky/engine/platform/transforms/AffineTransform.h"
34 #include "sky/engine/wtf/HashMap.h" 34 #include "sky/engine/wtf/HashMap.h"
35 #include "sky/engine/wtf/ListHashSet.h" 35 #include "sky/engine/wtf/ListHashSet.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class RenderBox;
39 class RenderInline; 40 class RenderInline;
40 class RenderLayerModelObject;
41 class RenderObject; 41 class RenderObject;
42 42
43 /* 43 /*
44 * Paint the object and its children, clipped by (x|y|w|h). 44 * Paint the object and its children, clipped by (x|y|w|h).
45 * (tx|ty) is the calculated position of the parent 45 * (tx|ty) is the calculated position of the parent
46 */ 46 */
47 struct PaintInfo { 47 struct PaintInfo {
48 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, 48 PaintInfo(GraphicsContext* newContext, const IntRect& newRect,
49 const RenderLayerModelObject* newPaintContainer) 49 const RenderBox* newPaintContainer)
50 : context(newContext) 50 : context(newContext)
51 , rect(newRect) 51 , rect(newRect)
52 , m_paintContainer(newPaintContainer) 52 , m_paintContainer(newPaintContainer)
53 { 53 {
54 } 54 }
55 55
56 void applyTransform(const AffineTransform& localToAncestorTransform, bool id entityStatusUnknown = true) 56 void applyTransform(const AffineTransform& localToAncestorTransform, bool id entityStatusUnknown = true)
57 { 57 {
58 if (identityStatusUnknown && localToAncestorTransform.isIdentity()) 58 if (identityStatusUnknown && localToAncestorTransform.isIdentity())
59 return; 59 return;
60 60
61 context->concatCTM(localToAncestorTransform); 61 context->concatCTM(localToAncestorTransform);
62 62
63 if (rect == infiniteRect()) 63 if (rect == infiniteRect())
64 return; 64 return;
65 65
66 if (localToAncestorTransform.isInvertible()) 66 if (localToAncestorTransform.isInvertible())
67 rect = localToAncestorTransform.inverse().mapRect(rect); 67 rect = localToAncestorTransform.inverse().mapRect(rect);
68 else 68 else
69 rect.setSize(IntSize(0, 0)); 69 rect.setSize(IntSize(0, 0));
70 } 70 }
71 71
72 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); } 72 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); }
73 const RenderLayerModelObject* paintContainer() const { return m_paintContain er; } 73 const RenderBox* paintContainer() const { return m_paintContainer; }
74 74
75 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/. 75 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/.
76 GraphicsContext* context; 76 GraphicsContext* context;
77 IntRect rect; 77 IntRect rect;
78 78
79 private: 79 private:
80 const RenderLayerModelObject* m_paintContainer; // the layer object that ori ginates the current painting 80 const RenderBox* m_paintContainer; // the layer object that originates the c urrent painting
81 }; 81 };
82 82
83 } // namespace blink 83 } // namespace blink
84 84
85 #endif // SKY_ENGINE_CORE_RENDERING_PAINTINFO_H_ 85 #endif // SKY_ENGINE_CORE_RENDERING_PAINTINFO_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698