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

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

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintInfo.h
diff --git a/third_party/WebKit/Source/core/paint/PaintInfo.h b/third_party/WebKit/Source/core/paint/PaintInfo.h
index 9ee1efdd6b33cc96dc8e5e51ee142a72e29cd50f..a5113dccebdd62fd130d07089a9e7e7b07a5bb77 100644
--- a/third_party/WebKit/Source/core/paint/PaintInfo.h
+++ b/third_party/WebKit/Source/core/paint/PaintInfo.h
@@ -26,14 +26,15 @@
#ifndef PaintInfo_h
#define PaintInfo_h
-// TODO(jchaffraix): Once we unify PaintBehavior and PaintLayerFlags, we should move
-// PaintLayerFlags to PaintPhase and rename it. Thus removing the need for this #include.
#include "core/CoreExport.h"
+// TODO(jchaffraix): Once we unify PaintBehavior and PaintLayerFlags, we should move
+// PaintLayerFlags to PaintPhase and rename it. Thus removing the need for this #include.#include "core/paint/PaintLayerPaintingInfo.h"
#include "core/paint/PaintLayerPaintingInfo.h"
#include "core/paint/PaintPhase.h"
#include "platform/geometry/IntRect.h"
#include "platform/geometry/LayoutRect.h"
#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/paint/CullRect.h"
#include "platform/graphics/paint/DisplayItem.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/Allocator.h"
@@ -49,34 +50,6 @@ class LayoutBoxModelObject;
class LayoutObject;
class PaintInvalidationState;
-class CORE_EXPORT CullRect {
-public:
- explicit CullRect(const IntRect& rect) : m_rect(rect) { }
- CullRect(const CullRect&, const IntPoint& offset);
-
- bool intersectsCullRect(const AffineTransform&, const FloatRect& boundingBox) const;
- void updateCullRect(const AffineTransform& localToParentTransform);
- bool intersectsCullRect(const IntRect&) const;
- bool intersectsCullRect(const LayoutRect&) const;
- bool intersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const;
- bool intersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const;
-
-private:
- IntRect m_rect;
-
- // TODO(chrishtr): temporary while we implement CullRect everywhere.
- friend class ReplicaPainter;
- friend class GridPainter;
- friend class PartPainter;
- friend class ScrollableAreaPainter;
- friend class SVGPaintContext;
- friend class SVGShapePainter;
- friend class TableSectionPainter;
- friend class ThemePainterMac;
- friend class SVGInlineTextBoxPainter;
- friend class SVGRootInlineBoxPainter;
-};
-
struct CORE_EXPORT PaintInfo {
ALLOW_ONLY_INLINE_ALLOCATION();
PaintInfo(GraphicsContext* newContext, const IntRect& cullRect, PaintPhase newPhase, GlobalPaintFlags globalPaintFlags, PaintLayerFlags paintFlags,
« no previous file with comments | « third_party/WebKit/Source/core/paint/FramePainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698