| Index: Source/core/html/canvas/CanvasRenderingContext2D.h
|
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
|
| index c5b9efadd002a6999f58f16aa4f27baf7a0b752a..4bddf938b2f17b4cf6e6c2f4843cb2ec0f8db593 100644
|
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.h
|
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
|
| @@ -112,6 +112,8 @@ public:
|
| float globalAlpha() const;
|
| void setGlobalAlpha(float);
|
|
|
| + bool isContextLost() const;
|
| +
|
| String globalCompositeOperation() const;
|
| void setGlobalCompositeOperation(const String&);
|
|
|
| @@ -227,6 +229,9 @@ public:
|
| void drawFocusIfNeeded(Element*);
|
| bool drawCustomFocusRing(Element*);
|
|
|
| + void loseContext();
|
| + void restoreContext();
|
| +
|
| private:
|
| class State FINAL : public CSSFontSelectorClient {
|
| public:
|
| @@ -282,6 +287,10 @@ private:
|
| void applyShadow();
|
| bool shouldDrawShadows() const;
|
|
|
| + void dispatchContextLostEvent(Timer<CanvasRenderingContext2D>*);
|
| + void dispatchContextRestoredEvent(Timer<CanvasRenderingContext2D>*);
|
| + void tryRestoreContextEvent(Timer<CanvasRenderingContext2D>*);
|
| +
|
| bool computeDirtyRect(const FloatRect& localBounds, FloatRect*);
|
| bool computeDirtyRect(const FloatRect& localBounds, const FloatRect& transformedClipBounds, FloatRect*);
|
| void didDraw(const FloatRect&);
|
| @@ -334,7 +343,14 @@ private:
|
| WillBePersistentHeapVector<OwnPtrWillBeMember<State> > m_stateStack;
|
| bool m_usesCSSCompatibilityParseMode;
|
| bool m_hasAlpha;
|
| + bool m_isContextLost;
|
| + bool m_contextRestorable;
|
| + Canvas2DContextStorage m_storageMode;
|
| MutableStylePropertyMap m_fetchedFonts;
|
| + unsigned m_tryRestoreContextAttemptCount;
|
| + Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer;
|
| + Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer;
|
| + Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer;
|
| };
|
|
|
| DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, context->is2d(), context.is2d());
|
|
|