OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 struct LayerFragment { | 34 struct LayerFragment { |
35 public: | 35 public: |
36 LayerFragment() | 36 LayerFragment() |
37 : shouldPaintContent(false) | 37 : shouldPaintContent(false) |
38 { | 38 { |
39 } | 39 } |
40 | 40 |
41 void setRects(const LayoutRect& bounds, const ClipRect& background, const Cl
ipRect& foreground, const ClipRect& outline) | |
42 { | |
43 layerBounds = bounds; | |
44 backgroundRect = background; | |
45 foregroundRect = foreground; | |
46 outlineRect = outline; | |
47 } | |
48 | |
49 void moveBy(const LayoutPoint& offset) | |
50 { | |
51 layerBounds.moveBy(offset); | |
52 backgroundRect.moveBy(offset); | |
53 foregroundRect.moveBy(offset); | |
54 outlineRect.moveBy(offset); | |
55 } | |
56 | |
57 void intersect(const LayoutRect& rect) | |
58 { | |
59 backgroundRect.intersect(rect); | |
60 foregroundRect.intersect(rect); | |
61 outlineRect.intersect(rect); | |
62 } | |
63 | |
64 bool shouldPaintContent; | 41 bool shouldPaintContent; |
65 LayoutRect layerBounds; | 42 LayoutRect layerBounds; |
66 ClipRect backgroundRect; | 43 ClipRect backgroundRect; |
67 ClipRect foregroundRect; | 44 ClipRect foregroundRect; |
68 ClipRect outlineRect; | 45 ClipRect outlineRect; |
69 }; | 46 }; |
70 | 47 |
71 typedef Vector<LayerFragment, 1> LayerFragments; | 48 typedef Vector<LayerFragment, 1> LayerFragments; |
72 | 49 |
73 } // namespace blink | 50 } // namespace blink |
74 | 51 |
75 #endif // SKY_ENGINE_CORE_RENDERING_LAYERFRAGMENT_H_ | 52 #endif // SKY_ENGINE_CORE_RENDERING_LAYERFRAGMENT_H_ |
OLD | NEW |