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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2DState.h

Issue 1093673002: Removing the dependency on GraphicsContext for drawing images in 2D canvas (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: pdr corrections + needsrebaselines Created 5 years, 7 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 | Annotate | Revision Log
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 "core/html/canvas/ClipList.h" 9 #include "core/html/canvas/ClipList.h"
10 #include "platform/fonts/Font.h" 10 #include "platform/fonts/Font.h"
(...skipping 12 matching lines...) Expand all
23 DECLARE_VIRTUAL_TRACE(); 23 DECLARE_VIRTUAL_TRACE();
24 24
25 enum ClipListCopyMode { 25 enum ClipListCopyMode {
26 CopyClipList, 26 CopyClipList,
27 DontCopyClipList 27 DontCopyClipList
28 }; 28 };
29 29
30 enum PaintType { 30 enum PaintType {
31 FillPaintType, 31 FillPaintType,
32 StrokePaintType, 32 StrokePaintType,
33 ImagePaintType,
33 }; 34 };
34 35
35 CanvasRenderingContext2DState(const CanvasRenderingContext2DState&, ClipList CopyMode = CopyClipList); 36 CanvasRenderingContext2DState(const CanvasRenderingContext2DState&, ClipList CopyMode = CopyClipList);
36 CanvasRenderingContext2DState& operator=(const CanvasRenderingContext2DState &); 37 CanvasRenderingContext2DState& operator=(const CanvasRenderingContext2DState &);
37 38
38 // CSSFontSelectorClient implementation 39 // CSSFontSelectorClient implementation
39 virtual void fontsNeedUpdate(CSSFontSelector*) override; 40 virtual void fontsNeedUpdate(CSSFontSelector*) override;
40 41
41 bool hasUnrealizedSaves() const { return m_unrealizedSaveCount; } 42 bool hasUnrealizedSaves() const { return m_unrealizedSaveCount; }
42 void save() { ++m_unrealizedSaveCount; } 43 void save() { ++m_unrealizedSaveCount; }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 unsigned m_unrealizedSaveCount; 152 unsigned m_unrealizedSaveCount;
152 153
153 String m_unparsedStrokeColor; 154 String m_unparsedStrokeColor;
154 String m_unparsedFillColor; 155 String m_unparsedFillColor;
155 RefPtrWillBeMember<CanvasStyle> m_strokeStyle; 156 RefPtrWillBeMember<CanvasStyle> m_strokeStyle;
156 RefPtrWillBeMember<CanvasStyle> m_fillStyle; 157 RefPtrWillBeMember<CanvasStyle> m_fillStyle;
157 158
158 mutable SkPaint m_strokePaint; 159 mutable SkPaint m_strokePaint;
159 mutable SkPaint m_fillPaint; 160 mutable SkPaint m_fillPaint;
161 mutable SkPaint m_imagePaint;
160 162
161 FloatSize m_shadowOffset; 163 FloatSize m_shadowOffset;
162 float m_shadowBlur; 164 float m_shadowBlur;
163 SkColor m_shadowColor; 165 SkColor m_shadowColor;
164 mutable RefPtr<SkDrawLooper> m_emptyDrawLooper; 166 mutable RefPtr<SkDrawLooper> m_emptyDrawLooper;
165 mutable RefPtr<SkDrawLooper> m_shadowOnlyDrawLooper; 167 mutable RefPtr<SkDrawLooper> m_shadowOnlyDrawLooper;
166 mutable RefPtr<SkDrawLooper> m_shadowAndForegroundDrawLooper; 168 mutable RefPtr<SkDrawLooper> m_shadowAndForegroundDrawLooper;
167 mutable RefPtr<SkImageFilter> m_shadowOnlyImageFilter; 169 mutable RefPtr<SkImageFilter> m_shadowOnlyImageFilter;
168 mutable RefPtr<SkImageFilter> m_shadowAndForegroundImageFilter; 170 mutable RefPtr<SkImageFilter> m_shadowAndForegroundImageFilter;
169 171
(...skipping 17 matching lines...) Expand all
187 mutable bool m_fillStyleDirty : 1; 189 mutable bool m_fillStyleDirty : 1;
188 mutable bool m_strokeStyleDirty : 1; 190 mutable bool m_strokeStyleDirty : 1;
189 mutable bool m_lineDashDirty : 1; 191 mutable bool m_lineDashDirty : 1;
190 192
191 ClipList m_clipList; 193 ClipList m_clipList;
192 }; 194 };
193 195
194 } // blink 196 } // blink
195 197
196 #endif 198 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698