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

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

Issue 1294233004: Subtree caching implementation in blink-core (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/setSelfNeedsRepaint/setNeedsRepaint/ Created 5 years, 4 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
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 // Ids are for matching new DisplayItems with existing DisplayItems. 199 // Ids are for matching new DisplayItems with existing DisplayItems.
200 struct Id { 200 struct Id {
201 Id(const DisplayItemClient client, const Type type, const unsigned scope ) 201 Id(const DisplayItemClient client, const Type type, const unsigned scope )
202 : client(client) 202 : client(client)
203 , type(type) 203 , type(type)
204 , scope(scope) { } 204 , scope(scope) { }
205 205
206 bool matches(const DisplayItem& item) const 206 bool matches(const DisplayItem& item) const
207 { 207 {
208 // We should always convert to non-cached types before matching.
209 ASSERT(!isCachedType(item.m_type));
210 ASSERT(!isCachedType(type));
211 return client == item.m_client 208 return client == item.m_client
212 && type == item.m_type 209 && type == item.m_type
213 && scope == item.m_scope; 210 && scope == item.m_scope;
214 } 211 }
215 212
216 const DisplayItemClient client; 213 const DisplayItemClient client;
217 const Type type; 214 const Type type;
218 const unsigned scope; 215 const unsigned scope;
219 }; 216 };
220 217
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; 380 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0;
384 #endif 381 #endif
385 382
386 private: 383 private:
387 bool isEnd() const final { return true; } 384 bool isEnd() const final { return true; }
388 }; 385 };
389 386
390 } // namespace blink 387 } // namespace blink
391 388
392 #endif // DisplayItem_h 389 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698