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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 class Path2D; | 57 class Path2D; |
58 class Element; | 58 class Element; |
59 class ExceptionState; | 59 class ExceptionState; |
60 class FloatRect; | 60 class FloatRect; |
61 class HTMLCanvasElement; | 61 class HTMLCanvasElement; |
62 class HTMLImageElement; | 62 class HTMLImageElement; |
63 class HTMLVideoElement; | 63 class HTMLVideoElement; |
64 class ImageData; | 64 class ImageData; |
65 class TextMetrics; | 65 class TextMetrics; |
66 | 66 |
67 typedef WillBeHeapHashMap<String, RefPtrWillBeMember<MutableStylePropertySet> >
MutableStylePropertyMap; | 67 typedef WillBeHeapHashMap<String, RefPtrWillBeMember<MutableStylePropertySet>> M
utableStylePropertyMap; |
68 | 68 |
69 class CanvasRenderingContext2D final: public CanvasRenderingContext, public Scri
ptWrappable, public CanvasPathMethods { | 69 class CanvasRenderingContext2D final: public CanvasRenderingContext, public Scri
ptWrappable, public CanvasPathMethods { |
70 DEFINE_WRAPPERTYPEINFO(); | 70 DEFINE_WRAPPERTYPEINFO(); |
71 public: | 71 public: |
72 static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2D> create(HTMLCanvasEle
ment* canvas, const Canvas2DContextAttributes* attrs, Document& document) | 72 static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2D> create(HTMLCanvasEle
ment* canvas, const Canvas2DContextAttributes* attrs, Document& document) |
73 { | 73 { |
74 return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs, do
cument)); | 74 return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs, do
cument)); |
75 } | 75 } |
76 virtual ~CanvasRenderingContext2D(); | 76 virtual ~CanvasRenderingContext2D(); |
77 | 77 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 virtual bool is2d() const override { return true; } | 357 virtual bool is2d() const override { return true; } |
358 virtual bool isAccelerated() const override; | 358 virtual bool isAccelerated() const override; |
359 virtual bool hasAlpha() const override { return m_hasAlpha; } | 359 virtual bool hasAlpha() const override { return m_hasAlpha; } |
360 virtual void setIsHidden(bool) override; | 360 virtual void setIsHidden(bool) override; |
361 | 361 |
362 virtual bool isTransformInvertible() const override { return state().m_inver
tibleCTM; } | 362 virtual bool isTransformInvertible() const override { return state().m_inver
tibleCTM; } |
363 | 363 |
364 virtual WebLayer* platformLayer() const override; | 364 virtual WebLayer* platformLayer() const override; |
365 TextDirection toTextDirection(Direction, RenderStyle** computedStyle = nullp
tr) const; | 365 TextDirection toTextDirection(Direction, RenderStyle** computedStyle = nullp
tr) const; |
366 | 366 |
367 WillBeHeapVector<OwnPtrWillBeMember<State> > m_stateStack; | 367 WillBeHeapVector<OwnPtrWillBeMember<State>> m_stateStack; |
368 OwnPtrWillBeMember<HitRegionManager> m_hitRegionManager; | 368 OwnPtrWillBeMember<HitRegionManager> m_hitRegionManager; |
369 bool m_usesCSSCompatibilityParseMode; | 369 bool m_usesCSSCompatibilityParseMode; |
370 GraphicsContext::AntiAliasingMode m_clipAntialiasing; | 370 GraphicsContext::AntiAliasingMode m_clipAntialiasing; |
371 bool m_hasAlpha; | 371 bool m_hasAlpha; |
372 bool m_isContextLost; | 372 bool m_isContextLost; |
373 bool m_contextRestorable; | 373 bool m_contextRestorable; |
374 Canvas2DContextStorage m_storageMode; | 374 Canvas2DContextStorage m_storageMode; |
375 MutableStylePropertyMap m_fetchedFonts; | 375 MutableStylePropertyMap m_fetchedFonts; |
376 ListHashSet<String> m_fetchedFontsLRUList; | 376 ListHashSet<String> m_fetchedFontsLRUList; |
377 unsigned m_tryRestoreContextAttemptCount; | 377 unsigned m_tryRestoreContextAttemptCount; |
378 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 378 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
379 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 379 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
380 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 380 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
381 }; | 381 }; |
382 | 382 |
383 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 383 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
384 | 384 |
385 } // namespace blink | 385 } // namespace blink |
386 | 386 |
387 #endif // CanvasRenderingContext2D_h | 387 #endif // CanvasRenderingContext2D_h |
OLD | NEW |