OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "core/html/canvas/Canvas2DContextAttributes.h" | 32 #include "core/html/canvas/Canvas2DContextAttributes.h" |
33 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 33 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
34 #include "core/html/canvas/CanvasPathMethods.h" | 34 #include "core/html/canvas/CanvasPathMethods.h" |
35 #include "core/html/canvas/CanvasRenderingContext.h" | 35 #include "core/html/canvas/CanvasRenderingContext.h" |
36 #include "core/html/canvas/ClipList.h" | 36 #include "core/html/canvas/ClipList.h" |
37 #include "core/html/canvas/HitRegion.h" | 37 #include "core/html/canvas/HitRegion.h" |
38 #include "core/svg/SVGMatrixTearOff.h" | 38 #include "core/svg/SVGMatrixTearOff.h" |
39 #include "platform/fonts/Font.h" | 39 #include "platform/fonts/Font.h" |
40 #include "platform/graphics/Color.h" | 40 #include "platform/graphics/Color.h" |
41 #include "platform/geometry/FloatSize.h" | 41 #include "platform/geometry/FloatSize.h" |
42 #include "platform/graphics/GraphicsContext.h" | |
43 #include "platform/graphics/GraphicsTypes.h" | 42 #include "platform/graphics/GraphicsTypes.h" |
44 #include "platform/graphics/ImageBuffer.h" | 43 #include "platform/graphics/ImageBuffer.h" |
45 #include "platform/graphics/Path.h" | 44 #include "platform/graphics/Path.h" |
46 #include "platform/transforms/AffineTransform.h" | 45 #include "platform/transforms/AffineTransform.h" |
47 #include "wtf/HashMap.h" | 46 #include "wtf/HashMap.h" |
48 #include "wtf/ListHashSet.h" | 47 #include "wtf/ListHashSet.h" |
49 #include "wtf/Vector.h" | 48 #include "wtf/Vector.h" |
50 #include "wtf/text/WTFString.h" | 49 #include "wtf/text/WTFString.h" |
51 | 50 |
52 namespace blink { class WebLayer; } | 51 namespace blink { class WebLayer; } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 virtual void fontsNeedUpdate(CSSFontSelector*) override; | 242 virtual void fontsNeedUpdate(CSSFontSelector*) override; |
244 | 243 |
245 virtual void trace(Visitor*) override; | 244 virtual void trace(Visitor*) override; |
246 | 245 |
247 unsigned m_unrealizedSaveCount; | 246 unsigned m_unrealizedSaveCount; |
248 | 247 |
249 String m_unparsedStrokeColor; | 248 String m_unparsedStrokeColor; |
250 String m_unparsedFillColor; | 249 String m_unparsedFillColor; |
251 RefPtrWillBeMember<CanvasStyle> m_strokeStyle; | 250 RefPtrWillBeMember<CanvasStyle> m_strokeStyle; |
252 RefPtrWillBeMember<CanvasStyle> m_fillStyle; | 251 RefPtrWillBeMember<CanvasStyle> m_fillStyle; |
| 252 |
253 float m_lineWidth; | 253 float m_lineWidth; |
254 LineCap m_lineCap; | 254 LineCap m_lineCap; |
255 LineJoin m_lineJoin; | 255 LineJoin m_lineJoin; |
256 float m_miterLimit; | 256 float m_miterLimit; |
257 FloatSize m_shadowOffset; | 257 FloatSize m_shadowOffset; |
258 float m_shadowBlur; | 258 float m_shadowBlur; |
259 RGBA32 m_shadowColor; | 259 RGBA32 m_shadowColor; |
260 float m_globalAlpha; | 260 float m_globalAlpha; |
261 SkXfermode::Mode m_globalComposite; | 261 SkXfermode::Mode m_globalComposite; |
262 AffineTransform m_transform; | 262 AffineTransform m_transform; |
(...skipping 27 matching lines...) Expand all Loading... |
290 bool shouldDrawShadows() const; | 290 bool shouldDrawShadows() const; |
291 | 291 |
292 void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*); | 292 void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*); |
293 void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*); | 293 void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*); |
294 void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*); | 294 void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*); |
295 | 295 |
296 bool computeDirtyRect(const FloatRect& localBounds, FloatRect*); | 296 bool computeDirtyRect(const FloatRect& localBounds, FloatRect*); |
297 bool computeDirtyRect(const FloatRect& localBounds, const FloatRect& transfo
rmedClipBounds, FloatRect*); | 297 bool computeDirtyRect(const FloatRect& localBounds, const FloatRect& transfo
rmedClipBounds, FloatRect*); |
298 void didDraw(const FloatRect&); | 298 void didDraw(const FloatRect&); |
299 | 299 |
300 GraphicsContext* drawingContext() const; | 300 GraphicsContext* drawingContext() const; // Deprecated: use drawingCanvas |
| 301 SkCanvas* drawingCanvas() const; |
301 | 302 |
302 void unwindStateStack(); | 303 void unwindStateStack(); |
303 void realizeSaves(GraphicsContext*); | 304 void realizeSaves(SkCanvas*); |
304 | 305 |
305 void applyStrokePattern(); | 306 void applyStrokePattern(); |
306 void applyFillPattern(); | 307 void applyFillPattern(); |
307 | 308 |
308 void drawImageInternal(CanvasImageSource*, float sx, float sy, float sw, flo
at sh, float dx, float dy, float dw, float dh, ExceptionState&); | 309 void drawImageInternal(CanvasImageSource*, float sx, float sy, float sw, flo
at sh, float dx, float dy, float dw, float dh, ExceptionState&); |
309 | 310 |
310 void fillInternal(const Path&, const String& windingRuleString); | 311 void fillInternal(const Path&, const String& windingRuleString); |
311 void strokeInternal(const Path&); | 312 void strokeInternal(const Path&); |
312 void clipInternal(const Path&, const String& windingRuleString); | 313 void clipInternal(const Path&, const String& windingRuleString); |
313 | 314 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 360 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
360 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 361 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
361 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 362 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
362 }; | 363 }; |
363 | 364 |
364 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 365 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
365 | 366 |
366 } // namespace blink | 367 } // namespace blink |
367 | 368 |
368 #endif // CanvasRenderingContext2D_h | 369 #endif // CanvasRenderingContext2D_h |
OLD | NEW |