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

Side by Side Diff: Source/modules/canvas2d/CanvasRenderingContext2DState.h

Issue 1299323005: blink: Add backdrop-filter support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed some todos Created 5 years, 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CanvasRenderingContext2DState_h 5 #ifndef CanvasRenderingContext2DState_h
6 #define CanvasRenderingContext2DState_h 6 #define CanvasRenderingContext2DState_h
7 7
8 #include "core/css/CSSFontSelectorClient.h" 8 #include "core/css/CSSFontSelectorClient.h"
9 #include "modules/canvas2d/ClipList.h" 9 #include "modules/canvas2d/ClipList.h"
10 #include "platform/fonts/Font.h" 10 #include "platform/fonts/Font.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 bool hasRealizedFont() const { return m_realizedFont; } 79 bool hasRealizedFont() const { return m_realizedFont; }
80 void setUnparsedFont(const String& font) { m_unparsedFont = font; } 80 void setUnparsedFont(const String& font) { m_unparsedFont = font; }
81 const String& unparsedFont() const { return m_unparsedFont; } 81 const String& unparsedFont() const { return m_unparsedFont; }
82 82
83 void setFilter(PassRefPtrWillBeRawPtr<CSSValue>); 83 void setFilter(PassRefPtrWillBeRawPtr<CSSValue>);
84 void setUnparsedFilter(const String& filterString) { m_unparsedFilter = filt erString; } 84 void setUnparsedFilter(const String& filterString) { m_unparsedFilter = filt erString; }
85 const String& unparsedFilter() const { return m_unparsedFilter; } 85 const String& unparsedFilter() const { return m_unparsedFilter; }
86 SkImageFilter* getFilter(Element*, const Font&) const; 86 SkImageFilter* getFilter(Element*, const Font&) const;
87 bool hasFilter() const { return m_filterValue; } 87 bool hasFilter() const { return m_filterValue; }
88 88
89 void setBackdropFilter(PassRefPtrWillBeRawPtr<CSSValue>);
90 void setUnparsedBackdropFilter(const String& filterString) { m_unparsedBackd ropFilter = filterString; }
91 const String& unparsedBackdropFilter() const { return m_unparsedBackdropFilt er; }
92 SkImageFilter* getBackdropFilter(Element*, const Font&) const;
93 bool hasBackdropFilter() const { return m_backdropFilterValue; }
94
89 void setStrokeStyle(CanvasStyle*); 95 void setStrokeStyle(CanvasStyle*);
90 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); } 96 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); }
91 97
92 void setFillStyle(CanvasStyle*); 98 void setFillStyle(CanvasStyle*);
93 CanvasStyle* fillStyle() const { return m_fillStyle.get(); } 99 CanvasStyle* fillStyle() const { return m_fillStyle.get(); }
94 100
95 CanvasStyle* style(PaintType) const; 101 CanvasStyle* style(PaintType) const;
96 102
97 enum Direction { 103 enum Direction {
98 DirectionInherit, 104 DirectionInherit,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 Vector<float> m_lineDash; 202 Vector<float> m_lineDash;
197 float m_lineDashOffset; 203 float m_lineDashOffset;
198 204
199 String m_unparsedFont; 205 String m_unparsedFont;
200 Font m_font; 206 Font m_font;
201 207
202 String m_unparsedFilter; 208 String m_unparsedFilter;
203 RefPtrWillBeMember<CSSValue> m_filterValue; 209 RefPtrWillBeMember<CSSValue> m_filterValue;
204 mutable RefPtr<SkImageFilter> m_resolvedFilter; 210 mutable RefPtr<SkImageFilter> m_resolvedFilter;
205 211
212 String m_unparsedBackdropFilter;
213 RefPtrWillBeMember<CSSValue> m_backdropFilterValue;
214 mutable RefPtr<SkImageFilter> m_resolvedBackdropFilter;
215
206 // Text state. 216 // Text state.
207 TextAlign m_textAlign; 217 TextAlign m_textAlign;
208 TextBaseline m_textBaseline; 218 TextBaseline m_textBaseline;
209 Direction m_direction; 219 Direction m_direction;
210 220
211 bool m_realizedFont : 1; 221 bool m_realizedFont : 1;
212 bool m_isTransformInvertible : 1; 222 bool m_isTransformInvertible : 1;
213 bool m_hasClip : 1; 223 bool m_hasClip : 1;
214 bool m_hasComplexClip : 1; 224 bool m_hasComplexClip : 1;
215 mutable bool m_fillStyleDirty : 1; 225 mutable bool m_fillStyleDirty : 1;
216 mutable bool m_strokeStyleDirty : 1; 226 mutable bool m_strokeStyleDirty : 1;
217 mutable bool m_lineDashDirty : 1; 227 mutable bool m_lineDashDirty : 1;
218 228
219 ClipList m_clipList; 229 ClipList m_clipList;
220 }; 230 };
221 231
222 } // blink 232 } // blink
223 233
224 #endif 234 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698