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

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

Issue 2793233002: Remove begin/end subseq. display items, and store on PaintController instead. (Closed)
Patch Set: none Created 3 years, 8 months 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 kEndTransform3DFirst + kTransform3DLast - kTransform3DFirst, 175 kEndTransform3DFirst + kTransform3DLast - kTransform3DFirst,
176 176
177 kBeginFilter, 177 kBeginFilter,
178 kEndFilter, 178 kEndFilter,
179 kBeginCompositing, 179 kBeginCompositing,
180 kEndCompositing, 180 kEndCompositing,
181 kBeginTransform, 181 kBeginTransform,
182 kEndTransform, 182 kEndTransform,
183 kBeginClipPath, 183 kBeginClipPath,
184 kEndClipPath, 184 kEndClipPath,
185
186 kSubsequence,
187 kEndSubsequence,
188
189 kUninitializedType, 185 kUninitializedType,
190 kTypeLast = kUninitializedType 186 kTypeLast = kUninitializedType
191 }; 187 };
192 188
193 static_assert(kTableCollapsedBorderBase >= kTableCollapsedBorderUnalignedBase, 189 static_assert(kTableCollapsedBorderBase >= kTableCollapsedBorderUnalignedBase,
194 "TableCollapsedBorder types overlap with other types"); 190 "TableCollapsedBorder types overlap with other types");
195 static_assert((kTableCollapsedBorderBase & 0xf) == 0, 191 static_assert((kTableCollapsedBorderBase & 0xf) == 0,
196 "The lowest 4 bits of TableCollapsedBorderBase should be zero"); 192 "The lowest 4 bits of TableCollapsedBorderBase should be zero");
197 // Bits or'ed onto TableCollapsedBorderBase to generate a real table collapsed 193 // Bits or'ed onto TableCollapsedBorderBase to generate a real table collapsed
198 // border type. 194 // border type.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds) 303 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds)
308 304
309 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip) 305 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip)
310 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip) 306 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip)
311 307
312 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll) 308 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll)
313 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll) 309 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll)
314 310
315 DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D) 311 DEFINE_PAIRED_CATEGORY_METHODS(Transform3D, transform3D)
316 312
317 static bool isCacheableType(Type type) { 313 static bool isCacheableType(Type type) { return isDrawingType(type); }
318 return isDrawingType(type) || type == kSubsequence;
319 }
320 bool isCacheable() const { 314 bool isCacheable() const {
321 return !skippedCache() && isCacheableType(m_type); 315 return !skippedCache() && isCacheableType(m_type);
322 } 316 }
323 317
324 virtual bool isBegin() const { return false; } 318 virtual bool isBegin() const { return false; }
325 virtual bool isEnd() const { return false; } 319 virtual bool isEnd() const { return false; }
326 320
327 #if DCHECK_IS_ON() 321 #if DCHECK_IS_ON()
328 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const { 322 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const {
329 return false; 323 return false;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; 404 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0;
411 #endif 405 #endif
412 406
413 private: 407 private:
414 bool isEnd() const final { return true; } 408 bool isEnd() const final { return true; }
415 }; 409 };
416 410
417 } // namespace blink 411 } // namespace blink
418 412
419 #endif // DisplayItem_h 413 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698