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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FloatClipRect_h
6 #define FloatClipRect_h
7
8 #include "platform/geometry/FloatRect.h"
9 #include "wtf/Allocator.h"
10
11 namespace blink {
12
13 class PLATFORM_EXPORT FloatClipRect {
14 USING_FAST_MALLOC(FloatClipRect);
15
16 public:
17 FloatClipRect() : m_hasRadius(false) {}
18
19 FloatClipRect(const FloatRect& rect) : m_rect(rect), m_hasRadius(false) {}
20
21 const FloatRect& rect() const { return m_rect; }
22
23 void intersect(const FloatRect& other) { m_rect.intersect(other); }
24
25 bool hasRadius() const { return m_hasRadius; }
26 void setHasRadius(bool hasRadius) { m_hasRadius = hasRadius; }
27
28 void setRect(const FloatRect& rect) { m_rect = rect; }
29
30 private:
31 FloatRect m_rect;
32 bool m_hasRadius;
33 };
34
35 } // namespace blink
36
37 #endif // FloatClipRect_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698