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

Side by Side Diff: Source/platform/graphics/paint/SubtreeDisplayItem.h

Issue 1313223002: Simplify subtree (now subsequence) caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SubtreeDisplayItem_h
6 #define SubtreeDisplayItem_h
7
8 #include "platform/geometry/FloatRect.h"
9 #include "platform/graphics/paint/DisplayItem.h"
10 #include "wtf/Assertions.h"
11
12 namespace blink {
13
14 class BeginSubtreeDisplayItem final : public PairedBeginDisplayItem {
15 public:
16 BeginSubtreeDisplayItem(const DisplayItemClientWrapper& client, Type type)
17 : PairedBeginDisplayItem(client, type, sizeof(*this))
18 {
19 ASSERT(isBeginSubtreeType(type));
20 }
21 };
22
23 class EndSubtreeDisplayItem final : public PairedEndDisplayItem {
24 public:
25 EndSubtreeDisplayItem(const DisplayItemClientWrapper& client, Type type)
26 : PairedEndDisplayItem(client, type, sizeof(*this))
27 {
28 ASSERT(isEndSubtreeType(type));
29 }
30
31 #if ENABLE(ASSERT)
32 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return Di splayItem::isBeginSubtreeType(otherType); }
33 #endif
34 };
35
36 } // namespace blink
37
38 #endif // SubtreeDisplayItem_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/SubsequenceRecorder.cpp ('k') | Source/platform/graphics/paint/SubtreeRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698