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

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

Issue 778043005: Remove RenderLayer::collectFragments. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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) 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
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_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderLayer.h » ('j') | sky/engine/core/rendering/RenderLayer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698