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

Unified Diff: Source/platform/graphics/paint/DisplayItem.h

Issue 1327563003: Don't cache subsequence whose layer is not fully contained by repaint rect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For review 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/paint/DisplayItem.h
diff --git a/Source/platform/graphics/paint/DisplayItem.h b/Source/platform/graphics/paint/DisplayItem.h
index 5587149c76a15c6686fa2e0c6b98d6ac4b81039b..2b6c0f22c06abc6053bbf5e04e5412d2258b0b94 100644
--- a/Source/platform/graphics/paint/DisplayItem.h
+++ b/Source/platform/graphics/paint/DisplayItem.h
@@ -189,6 +189,7 @@ public:
, m_type(type)
, m_derivedSize(derivedSize)
, m_skippedCache(false)
+ , m_isUncacheable(false)
#ifndef NDEBUG
, m_clientDebugString(client.debugName())
#endif
@@ -257,6 +258,9 @@ public:
void setSkippedCache() { m_skippedCache = true; }
bool skippedCache() const { return m_skippedCache; }
+ void setUncacheable() { m_isUncacheable = true; }
+ bool isUncacheable() const { return m_isUncacheable; }
chrishtr 2015/09/08 22:48:00 This can be private.
+
virtual void appendToWebDisplayItemList(WebDisplayItemList*) const { }
// See comments of enum Type for usage of the following macros.
@@ -312,7 +316,7 @@ public:
static bool isCachedType(Type type) { return isCachedDrawingType(type) || type == CachedSubsequence; }
bool isCached() const { return isCachedType(m_type); }
static bool isCacheableType(Type type) { return isDrawingType(type) || type == BeginSubsequence; }
- bool isCacheable() const { return !skippedCache() && isCacheableType(m_type); }
+ bool isCacheable() const { return !isUncacheable() && isCacheableType(m_type); }
virtual bool isBegin() const { return false; }
virtual bool isEnd() const { return false; }
@@ -346,6 +350,7 @@ private:
, m_type(UninitializedType)
, m_derivedSize(sizeof(*this))
, m_skippedCache(false)
+ , m_isUncacheable(false)
{ }
DisplayItemClient m_client;
@@ -354,6 +359,7 @@ private:
const Type m_type : 16;
unsigned m_derivedSize : 8; // size of the actual derived class
unsigned m_skippedCache : 1;
+ unsigned m_isUncacheable : 1;
#ifndef NDEBUG
WTF::String m_clientDebugString;

Powered by Google App Engine
This is Rietveld 408576698