| 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 |
| 41 bool shouldPaintContent; | 64 bool shouldPaintContent; |
| 42 LayoutRect layerBounds; | 65 LayoutRect layerBounds; |
| 43 ClipRect backgroundRect; | 66 ClipRect backgroundRect; |
| 44 ClipRect foregroundRect; | 67 ClipRect foregroundRect; |
| 45 ClipRect outlineRect; | 68 ClipRect outlineRect; |
| 46 }; | 69 }; |
| 47 | 70 |
| 48 typedef Vector<LayerFragment, 1> LayerFragments; | 71 typedef Vector<LayerFragment, 1> LayerFragments; |
| 49 | 72 |
| 50 } // namespace blink | 73 } // namespace blink |
| 51 | 74 |
| 52 #endif // SKY_ENGINE_CORE_RENDERING_LAYERFRAGMENT_H_ | 75 #endif // SKY_ENGINE_CORE_RENDERING_LAYERFRAGMENT_H_ |
| OLD | NEW |