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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/FloatClipRect.h

Issue 2699593006: Refactor to remove need for infiniteIntRect when computing rects in pre-paint (Closed)
Patch Set: none Created 3 years, 10 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/platform/graphics/paint/FloatClipRect.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/FloatClipRect.h b/third_party/WebKit/Source/platform/graphics/paint/FloatClipRect.h
index bb09206751b592d16f75273fdfd39e9d2d27840f..cf663efaa5e34c18c96c09b24175ca3b7149eb15 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/FloatClipRect.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/FloatClipRect.h
@@ -35,8 +35,8 @@ class PLATFORM_EXPORT FloatClipRect {
}
bool hasRadius() const { return m_hasRadius; }
- void setHasRadius(bool hasRadius) {
- m_hasRadius = hasRadius;
+ void setHasRadius() {
+ m_hasRadius = true;
m_isInfinite = false;
}
@@ -45,6 +45,12 @@ class PLATFORM_EXPORT FloatClipRect {
m_isInfinite = false;
}
+ void moveBy(const FloatPoint& offset) {
+ if (m_isInfinite)
+ return;
+ m_rect.moveBy(offset);
+ }
+
bool isInfinite() const { return m_isInfinite; }
private:
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/graphics/paint/FloatClipRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698