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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.h

Issue 2748103015: Replace ASSERT with DCHECK in core/layout/<sub dirs> (Closed)
Patch Set: Rebase with latest Created 3 years, 8 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
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ->clipPathUnits() 49 ->clipPathUnits()
50 ->currentValue() 50 ->currentValue()
51 ->enumValue(); 51 ->enumValue();
52 } 52 }
53 53
54 bool asPath(const AffineTransform&, const FloatRect& referenceBox, Path&); 54 bool asPath(const AffineTransform&, const FloatRect& referenceBox, Path&);
55 sk_sp<const PaintRecord> createPaintRecord(); 55 sk_sp<const PaintRecord> createPaintRecord();
56 56
57 bool hasCycle() { return m_inClipExpansion; } 57 bool hasCycle() { return m_inClipExpansion; }
58 void beginClipExpansion() { 58 void beginClipExpansion() {
59 ASSERT(!m_inClipExpansion); 59 DCHECK(!m_inClipExpansion);
60 m_inClipExpansion = true; 60 m_inClipExpansion = true;
61 } 61 }
62 void endClipExpansion() { 62 void endClipExpansion() {
63 ASSERT(m_inClipExpansion); 63 DCHECK(m_inClipExpansion);
64 m_inClipExpansion = false; 64 m_inClipExpansion = false;
65 } 65 }
66 66
67 private: 67 private:
68 void calculateLocalClipBounds(); 68 void calculateLocalClipBounds();
69 69
70 // Return true if the clip path was calculated or a cached value is available. 70 // Return true if the clip path was calculated or a cached value is available.
71 bool calculateClipContentPathIfNeeded(); 71 bool calculateClipContentPathIfNeeded();
72 72
73 // Cache of the clip path when using path clipping. 73 // Cache of the clip path when using path clipping.
74 Path m_clipContentPath; 74 Path m_clipContentPath;
75 75
76 // Cache of the clip path paint record when falling back to masking for 76 // Cache of the clip path paint record when falling back to masking for
77 // clipping. 77 // clipping.
78 sk_sp<const PaintRecord> m_cachedPaintRecord; 78 sk_sp<const PaintRecord> m_cachedPaintRecord;
79 79
80 FloatRect m_localClipBounds; 80 FloatRect m_localClipBounds;
81 81
82 // Reference cycle detection. 82 // Reference cycle detection.
83 bool m_inClipExpansion; 83 bool m_inClipExpansion;
84 }; 84 };
85 85
86 DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(LayoutSVGResourceClipper, 86 DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(LayoutSVGResourceClipper,
87 ClipperResourceType); 87 ClipperResourceType);
88 88
89 } // namespace blink 89 } // namespace blink
90 90
91 #endif 91 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698