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

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

Issue 666493002: Remove updatePaintingInfoForFragments() and per-fragment shouldPaintContent flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review. Add comment. Created 6 years, 1 month 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 | « Source/core/paint/LayerPainter.cpp ('k') | no next file » | 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) 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 15 matching lines...) Expand all
26 #ifndef LayerFragment_h 26 #ifndef LayerFragment_h
27 #define LayerFragment_h 27 #define LayerFragment_h
28 28
29 #include "core/rendering/ClipRect.h" 29 #include "core/rendering/ClipRect.h"
30 #include "wtf/Vector.h" 30 #include "wtf/Vector.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 struct LayerFragment { 34 struct LayerFragment {
35 public: 35 public:
36 LayerFragment()
37 : shouldPaintContent(false)
38 {
39 }
40
41 void setRects(const LayoutRect& bounds, const ClipRect& background, const Cl ipRect& foreground, const ClipRect& outline) 36 void setRects(const LayoutRect& bounds, const ClipRect& background, const Cl ipRect& foreground, const ClipRect& outline)
42 { 37 {
43 layerBounds = bounds; 38 layerBounds = bounds;
44 backgroundRect = background; 39 backgroundRect = background;
45 foregroundRect = foreground; 40 foregroundRect = foreground;
46 outlineRect = outline; 41 outlineRect = outline;
47 } 42 }
48 43
49 void moveBy(const LayoutPoint& offset) 44 void moveBy(const LayoutPoint& offset)
50 { 45 {
51 layerBounds.moveBy(offset); 46 layerBounds.moveBy(offset);
52 backgroundRect.moveBy(offset); 47 backgroundRect.moveBy(offset);
53 foregroundRect.moveBy(offset); 48 foregroundRect.moveBy(offset);
54 outlineRect.moveBy(offset); 49 outlineRect.moveBy(offset);
55 paginationClip.moveBy(offset); 50 paginationClip.moveBy(offset);
56 } 51 }
57 52
58 void intersect(const LayoutRect& rect) 53 void intersect(const LayoutRect& rect)
59 { 54 {
60 backgroundRect.intersect(rect); 55 backgroundRect.intersect(rect);
61 foregroundRect.intersect(rect); 56 foregroundRect.intersect(rect);
62 outlineRect.intersect(rect); 57 outlineRect.intersect(rect);
63 } 58 }
64 59
65 bool shouldPaintContent;
66 LayoutRect layerBounds; 60 LayoutRect layerBounds;
67 ClipRect backgroundRect; 61 ClipRect backgroundRect;
68 ClipRect foregroundRect; 62 ClipRect foregroundRect;
69 ClipRect outlineRect; 63 ClipRect outlineRect;
70 64
71 // Unique to paginated fragments. The physical translation to apply to shift the layer when painting/hit-testing. 65 // Unique to paginated fragments. The physical translation to apply to shift the layer when painting/hit-testing.
72 LayoutPoint paginationOffset; 66 LayoutPoint paginationOffset;
73 67
74 // Also unique to paginated fragments. An additional clip that applies to th e layer. It is in layer-local 68 // Also unique to paginated fragments. An additional clip that applies to th e layer. It is in layer-local
75 // (physical) coordinates. 69 // (physical) coordinates.
76 LayoutRect paginationClip; 70 LayoutRect paginationClip;
77 }; 71 };
78 72
79 typedef Vector<LayerFragment, 1> LayerFragments; 73 typedef Vector<LayerFragment, 1> LayerFragments;
80 74
81 } // namespace blink 75 } // namespace blink
82 76
83 #endif // LayerFragment_h 77 #endif // LayerFragment_h
OLDNEW
« no previous file with comments | « Source/core/paint/LayerPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698