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

Unified Diff: Source/core/paint/PaintInfo.h

Issue 1218013003: Keep a cache of caret painters to avoid recomputing all the time. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: a shade of deduplication blue Created 5 years, 6 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
« no previous file with comments | « Source/core/paint/PaintDataCache.cpp ('k') | Source/core/paint/ReplicaPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/PaintInfo.h
diff --git a/Source/core/paint/PaintInfo.h b/Source/core/paint/PaintInfo.h
index 910ff358488751632ba70178c2beece4748db4ae..1f4b0b56f399f33f0e598acd7fa26a84f53da594 100644
--- a/Source/core/paint/PaintInfo.h
+++ b/Source/core/paint/PaintInfo.h
@@ -43,11 +43,13 @@ namespace blink {
class LayoutInline;
class LayoutBoxModelObject;
class LayoutObject;
+class PaintDataCache;
struct PaintInfo {
PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase newPhase, PaintBehavior newPaintBehavior,
LayoutObject* newPaintingRoot = 0, ListHashSet<LayoutInline*>* newOutlineObjects = 0,
- const LayoutBoxModelObject* newPaintContainer = 0)
+ const LayoutBoxModelObject* newPaintContainer = 0,
+ PaintDataCache* newPaintDataCache = nullptr)
: context(newContext)
, rect(newRect)
, phase(newPhase)
@@ -55,6 +57,7 @@ struct PaintInfo {
, paintingRoot(newPaintingRoot)
, m_paintContainer(newPaintContainer)
, m_outlineObjects(newOutlineObjects)
+ , m_paintDataCache(newPaintDataCache)
{
}
@@ -98,6 +101,8 @@ struct PaintInfo {
rect = localToParentTransform.inverse().mapRect(rect);
}
+ PaintDataCache* paintDataCache() const { return m_paintDataCache; }
+
// FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout layout/.
GraphicsContext* context;
IntRect rect; // dirty rect used for culling non-intersecting layoutObjects
@@ -108,6 +113,7 @@ struct PaintInfo {
private:
const LayoutBoxModelObject* m_paintContainer; // the box model object that originates the current painting
ListHashSet<LayoutInline*>* m_outlineObjects; // used to list outlines that should be painted by a block with inline children
+ PaintDataCache* m_paintDataCache; // caches information frequently needed during paint
};
} // namespace blink
« no previous file with comments | « Source/core/paint/PaintDataCache.cpp ('k') | Source/core/paint/ReplicaPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698