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

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

Issue 2678263002: Plumb border radius through when computing clip visual rects. (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
new file mode 100644
index 0000000000000000000000000000000000000000..c135f236f872decf67977bd484b0c81b41b2c63c
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/paint/FloatClipRect.h
@@ -0,0 +1,37 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef FloatClipRect_h
+#define FloatClipRect_h
+
+#include "platform/geometry/FloatRect.h"
+#include "wtf/Allocator.h"
+
+namespace blink {
+
+class PLATFORM_EXPORT FloatClipRect {
+ USING_FAST_MALLOC(FloatClipRect);
+
+ public:
+ FloatClipRect() : m_hasRadius(false) {}
+
+ FloatClipRect(const FloatRect& rect) : m_rect(rect), m_hasRadius(false) {}
+
+ const FloatRect& rect() const { return m_rect; }
+
+ void intersect(const FloatRect& other) { m_rect.intersect(other); }
+
+ bool hasRadius() const { return m_hasRadius; }
+ void setHasRadius(bool hasRadius) { m_hasRadius = hasRadius; }
+
+ void setRect(const FloatRect& rect) { m_rect = rect; }
+
+ private:
+ FloatRect m_rect;
+ bool m_hasRadius;
+};
+
+} // namespace blink
+
+#endif // FloatClipRect_h

Powered by Google App Engine
This is Rietveld 408576698