| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 ~Factory() override {}; | 74 ~Factory() override {}; |
| 75 | 75 |
| 76 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> create(HTMLCanvasElement*
canvas, const CanvasContextCreationAttributes& attrs, Document& document) overr
ide | 76 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> create(HTMLCanvasElement*
canvas, const CanvasContextCreationAttributes& attrs, Document& document) overr
ide |
| 77 { | 77 { |
| 78 return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs
, document)); | 78 return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs
, document)); |
| 79 } | 79 } |
| 80 CanvasRenderingContext::ContextType contextType() const override { retur
n CanvasRenderingContext::Context2d; } | 80 CanvasRenderingContext::ContextType contextType() const override { retur
n CanvasRenderingContext::Context2d; } |
| 81 void onError(HTMLCanvasElement*, const String& error) override { }; | 81 void onError(HTMLCanvasElement*, const String& error) override { }; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 virtual ~CanvasRenderingContext2D(); | 84 ~CanvasRenderingContext2D() override; |
| 85 | 85 |
| 86 void strokeStyle(StringOrCanvasGradientOrCanvasPattern&) const; | 86 void strokeStyle(StringOrCanvasGradientOrCanvasPattern&) const; |
| 87 void setStrokeStyle(const StringOrCanvasGradientOrCanvasPattern&); | 87 void setStrokeStyle(const StringOrCanvasGradientOrCanvasPattern&); |
| 88 | 88 |
| 89 void fillStyle(StringOrCanvasGradientOrCanvasPattern&) const; | 89 void fillStyle(StringOrCanvasGradientOrCanvasPattern&) const; |
| 90 void setFillStyle(const StringOrCanvasGradientOrCanvasPattern&); | 90 void setFillStyle(const StringOrCanvasGradientOrCanvasPattern&); |
| 91 | 91 |
| 92 float lineWidth() const; | 92 float lineWidth() const; |
| 93 void setLineWidth(float); | 93 void setLineWidth(float); |
| 94 | 94 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 void validateStateStack(); | 287 void validateStateStack(); |
| 288 | 288 |
| 289 enum DrawType { | 289 enum DrawType { |
| 290 ClipFill, // Fill that is already known to cover the current clip | 290 ClipFill, // Fill that is already known to cover the current clip |
| 291 UntransformedUnclippedFill | 291 UntransformedUnclippedFill |
| 292 }; | 292 }; |
| 293 | 293 |
| 294 void checkOverdraw(const SkRect&, const SkPaint*, CanvasRenderingContext2DSt
ate::ImageType, DrawType); | 294 void checkOverdraw(const SkRect&, const SkPaint*, CanvasRenderingContext2DSt
ate::ImageType, DrawType); |
| 295 | 295 |
| 296 CanvasRenderingContext::ContextType contextType() const override { return Ca
nvasRenderingContext::Context2d; } | 296 CanvasRenderingContext::ContextType contextType() const override { return Ca
nvasRenderingContext::Context2d; } |
| 297 virtual bool is2d() const override { return true; } | 297 bool is2d() const override { return true; } |
| 298 virtual bool isAccelerated() const override; | 298 bool isAccelerated() const override; |
| 299 virtual bool hasAlpha() const override { return m_hasAlpha; } | 299 bool hasAlpha() const override { return m_hasAlpha; } |
| 300 virtual void setIsHidden(bool) override; | 300 void setIsHidden(bool) override; |
| 301 void stop() override final; | 301 void stop() final; |
| 302 DECLARE_VIRTUAL_TRACE(); | 302 DECLARE_VIRTUAL_TRACE(); |
| 303 | 303 |
| 304 virtual bool isTransformInvertible() const; | 304 virtual bool isTransformInvertible() const; |
| 305 | 305 |
| 306 virtual WebLayer* platformLayer() const override; | 306 WebLayer* platformLayer() const override; |
| 307 | 307 |
| 308 WillBeHeapVector<OwnPtrWillBeMember<CanvasRenderingContext2DState>> m_stateS
tack; | 308 WillBeHeapVector<OwnPtrWillBeMember<CanvasRenderingContext2DState>> m_stateS
tack; |
| 309 OwnPtrWillBeMember<HitRegionManager> m_hitRegionManager; | 309 OwnPtrWillBeMember<HitRegionManager> m_hitRegionManager; |
| 310 AntiAliasingMode m_clipAntialiasing; | 310 AntiAliasingMode m_clipAntialiasing; |
| 311 bool m_hasAlpha; | 311 bool m_hasAlpha; |
| 312 LostContextMode m_contextLostMode; | 312 LostContextMode m_contextLostMode; |
| 313 bool m_contextRestorable; | 313 bool m_contextRestorable; |
| 314 MutableStylePropertyMap m_fetchedFonts; | 314 MutableStylePropertyMap m_fetchedFonts; |
| 315 ListHashSet<String> m_fetchedFontsLRUList; | 315 ListHashSet<String> m_fetchedFontsLRUList; |
| 316 unsigned m_tryRestoreContextAttemptCount; | 316 unsigned m_tryRestoreContextAttemptCount; |
| 317 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 317 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
| 318 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 318 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
| 319 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 319 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 322 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
| 323 | 323 |
| 324 } // namespace blink | 324 } // namespace blink |
| 325 | 325 |
| 326 #endif // CanvasRenderingContext2D_h | 326 #endif // CanvasRenderingContext2D_h |
| OLD | NEW |