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

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

Issue 2107103002: Find cached display items directly during painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CachedDisplayItem_h
6 #define CachedDisplayItem_h
7
8 #include "platform/graphics/paint/DisplayItem.h"
9 #include "wtf/Assertions.h"
10
11 namespace blink {
12
13 // A placeholder of a DrawingDisplayItem or a subtree in the new paint DisplayIt emList,
14 // to indicate that the DrawingDisplayItem/subtree has not been changed and shou ld be replaced with
15 // the cached DrawingDisplayItem/subtree when merging new paint list to cached p aint list.
16 class CachedDisplayItem final : public DisplayItem {
17 public:
18 CachedDisplayItem(const DisplayItemClient& client, Type type)
19 : DisplayItem(client, type, sizeof(*this))
20 {
21 ASSERT(isCachedType(type));
22 }
23
24 private:
25 // CachedDisplayItem is never replayed or appended to WebDisplayItemList.
26 void replay(GraphicsContext&) const final { ASSERT_NOT_REACHED(); }
27 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const f inal { ASSERT_NOT_REACHED(); }
28 };
29
30 } // namespace blink
31
32 #endif // CachedDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698