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

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

Issue 1394313002: Make DisplayItem::replay const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return cachedSubsequenceTypeToSubsequenceType(type); 239 return cachedSubsequenceTypeToSubsequenceType(type);
240 return type; 240 return type;
241 } 241 }
242 242
243 // Return the Id with cached type converted to non-cached type. 243 // Return the Id with cached type converted to non-cached type.
244 Id nonCachedId() const 244 Id nonCachedId() const
245 { 245 {
246 return Id(m_client, nonCachedType(m_type), m_scope); 246 return Id(m_client, nonCachedType(m_type), m_scope);
247 } 247 }
248 248
249 virtual void replay(GraphicsContext&) { } 249 virtual void replay(GraphicsContext&) const { }
250 250
251 DisplayItemClient client() const { return m_client; } 251 DisplayItemClient client() const { return m_client; }
252 Type type() const { return m_type; } 252 Type type() const { return m_type; }
253 253
254 void setScope(unsigned scope) { m_scope = scope; } 254 void setScope(unsigned scope) { m_scope = scope; }
255 unsigned scope() { return m_scope; } 255 unsigned scope() { return m_scope; }
256 256
257 // Size of this object in memory, used to move it with memcpy. 257 // Size of this object in memory, used to move it with memcpy.
258 // This is not sizeof(*this), because it needs to account for the size of 258 // This is not sizeof(*this), because it needs to account for the size of
259 // the derived class (i.e. runtime type). Derived classes are expected to 259 // the derived class (i.e. runtime type). Derived classes are expected to
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; 394 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0;
395 #endif 395 #endif
396 396
397 private: 397 private:
398 bool isEnd() const final { return true; } 398 bool isEnd() const final { return true; }
399 }; 399 };
400 400
401 } // namespace blink 401 } // namespace blink
402 402
403 #endif // DisplayItem_h 403 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698