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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h

Issue 2495343002: Revert of Paint collapsed borders of a table as one display item (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DisplayItem_h 5 #ifndef DisplayItem_h
6 #define DisplayItem_h 6 #define DisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/ContiguousContainer.h" 9 #include "platform/graphics/ContiguousContainer.h"
10 #include "platform/graphics/paint/DisplayItemClient.h" 10 #include "platform/graphics/paint/DisplayItemClient.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 kScrollbarForwardTrack, 103 kScrollbarForwardTrack,
104 kScrollbarThumb, 104 kScrollbarThumb,
105 kScrollbarTickmarks, 105 kScrollbarTickmarks,
106 kScrollbarTrackBackground, 106 kScrollbarTrackBackground,
107 kScrollbarCompositedScrollbar, 107 kScrollbarCompositedScrollbar,
108 kSelectionTint, 108 kSelectionTint,
109 kTableCellBackgroundFromColumnGroup, 109 kTableCellBackgroundFromColumnGroup,
110 kTableCellBackgroundFromColumn, 110 kTableCellBackgroundFromColumn,
111 kTableCellBackgroundFromSection, 111 kTableCellBackgroundFromSection,
112 kTableCellBackgroundFromRow, 112 kTableCellBackgroundFromRow,
113 kTableCollapsedBorders, 113 // Table collapsed borders can be painted together (e.g., left & top) but
114 // there are at most 4 phases of collapsed border painting for a single
115 // cell. To disambiguate these phases of collapsed border painting, a mask
116 // is used. TableCollapsedBorderBase can be larger than
117 // TableCollapsedBorderUnalignedBase to ensure the base lower bits are 0's.
118 kTableCollapsedBorderUnalignedBase,
119 kTableCollapsedBorderBase =
120 (((kTableCollapsedBorderUnalignedBase - 1) >> 4) + 1) << 4,
121 kTableCollapsedBorderLast = kTableCollapsedBorderBase + 0x0f,
114 kTableSectionBoxShadowInset, 122 kTableSectionBoxShadowInset,
115 kTableSectionBoxShadowNormal, 123 kTableSectionBoxShadowNormal,
116 kTableRowBoxShadowInset, 124 kTableRowBoxShadowInset,
117 kTableRowBoxShadowNormal, 125 kTableRowBoxShadowNormal,
118 kVideoBitmap, 126 kVideoBitmap,
119 kWebPlugin, 127 kWebPlugin,
120 kWebFont, 128 kWebFont,
121 kReflectionMask, 129 kReflectionMask,
122 kDrawingLast = kReflectionMask, 130 kDrawingLast = kReflectionMask,
123 131
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 kBeginClipPath, 195 kBeginClipPath,
188 kEndClipPath, 196 kEndClipPath,
189 197
190 kSubsequence, 198 kSubsequence,
191 kEndSubsequence, 199 kEndSubsequence,
192 200
193 kUninitializedType, 201 kUninitializedType,
194 kTypeLast = kUninitializedType 202 kTypeLast = kUninitializedType
195 }; 203 };
196 204
205 static_assert(kTableCollapsedBorderBase >= kTableCollapsedBorderUnalignedBase,
206 "TableCollapsedBorder types overlap with other types");
207 static_assert((kTableCollapsedBorderBase & 0xf) == 0,
208 "The lowest 4 bits of TableCollapsedBorderBase should be zero");
209 // Bits or'ed onto TableCollapsedBorderBase to generate a real table collapsed
210 // border type.
211 enum TableCollapsedBorderSides {
212 TableCollapsedBorderTop = 1 << 0,
213 TableCollapsedBorderRight = 1 << 1,
214 TableCollapsedBorderBottom = 1 << 2,
215 TableCollapsedBorderLeft = 1 << 3,
216 };
217
197 DisplayItem(const DisplayItemClient& client, Type type, size_t derivedSize) 218 DisplayItem(const DisplayItemClient& client, Type type, size_t derivedSize)
198 : m_client(&client), 219 : m_client(&client),
199 m_type(type), 220 m_type(type),
200 m_derivedSize(derivedSize), 221 m_derivedSize(derivedSize),
201 m_skippedCache(false) 222 m_skippedCache(false)
202 #ifndef NDEBUG 223 #ifndef NDEBUG
203 , 224 ,
204 m_clientDebugString(client.debugName()) 225 m_clientDebugString(client.debugName())
205 #endif 226 #endif
206 { 227 {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; 422 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0;
402 #endif 423 #endif
403 424
404 private: 425 private:
405 bool isEnd() const final { return true; } 426 bool isEnd() const final { return true; }
406 }; 427 };
407 428
408 } // namespace blink 429 } // namespace blink
409 430
410 #endif // DisplayItem_h 431 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698