OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument,
ExceptionState&) const; | 113 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument,
ExceptionState&) const; |
114 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con
st { return toDataURL(mimeType, ScriptValue(), exceptionState); } | 114 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con
st { return toDataURL(mimeType, ScriptValue(), exceptionState); } |
115 | 115 |
116 // Used for rendering | 116 // Used for rendering |
117 void didDraw(const FloatRect&); | 117 void didDraw(const FloatRect&); |
118 void notifyObserversCanvasChanged(const FloatRect&); | 118 void notifyObserversCanvasChanged(const FloatRect&); |
119 | 119 |
120 void paint(GraphicsContext*, const LayoutRect&); | 120 void paint(GraphicsContext*, const LayoutRect&); |
121 | 121 |
122 SkCanvas* drawingCanvas() const; | 122 SkCanvas* drawingCanvas() const; |
123 SkCanvas* immediateDrawingCanvas() const; // Guarantees draws will not be de
ferred. Use sparingly. | 123 void disableDeferral() const; |
124 SkCanvas* existingDrawingCanvas() const; | 124 SkCanvas* existingDrawingCanvas() const; |
125 | 125 |
126 void setRenderingContext(PassOwnPtrWillBeRawPtr<CanvasRenderingContext>); | 126 void setRenderingContext(PassOwnPtrWillBeRawPtr<CanvasRenderingContext>); |
127 CanvasRenderingContext* renderingContext() const { return m_context.get(); } | 127 CanvasRenderingContext* renderingContext() const { return m_context.get(); } |
128 | 128 |
129 void ensureUnacceleratedImageBuffer(); | 129 void ensureUnacceleratedImageBuffer(); |
130 ImageBuffer* buffer() const; | 130 ImageBuffer* buffer() const; |
131 PassRefPtr<Image> copiedImage(SourceDrawingBuffer) const; | 131 PassRefPtr<Image> copiedImage(SourceDrawingBuffer) const; |
132 void clearCopiedImage(); | 132 void clearCopiedImage(); |
133 | 133 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 mutable bool m_didFailToCreateImageBuffer; | 225 mutable bool m_didFailToCreateImageBuffer; |
226 bool m_imageBufferIsClear; | 226 bool m_imageBufferIsClear; |
227 OwnPtr<ImageBuffer> m_imageBuffer; | 227 OwnPtr<ImageBuffer> m_imageBuffer; |
228 | 228 |
229 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 229 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
230 }; | 230 }; |
231 | 231 |
232 } // namespace blink | 232 } // namespace blink |
233 | 233 |
234 #endif // HTMLCanvasElement_h | 234 #endif // HTMLCanvasElement_h |
OLD | NEW |