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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 static String toEncodingMimeType(const String& mimeType); | 110 static String toEncodingMimeType(const String& mimeType); |
111 String toDataURL(const String& mimeType, const double* quality, ExceptionSta
te&) const; | 111 String toDataURL(const String& mimeType, const double* quality, ExceptionSta
te&) const; |
112 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con
st { return toDataURL(mimeType, 0, exceptionState); } | 112 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con
st { return toDataURL(mimeType, 0, exceptionState); } |
113 | 113 |
114 // Used for rendering | 114 // Used for rendering |
115 void didDraw(const FloatRect&); | 115 void didDraw(const FloatRect&); |
116 void notifyObserversCanvasChanged(const FloatRect&); | 116 void notifyObserversCanvasChanged(const FloatRect&); |
117 | 117 |
118 void paint(GraphicsContext*, const LayoutRect&); | 118 void paint(GraphicsContext*, const LayoutRect&); |
119 | 119 |
120 GraphicsContext* drawingContext() const; | 120 GraphicsContext* drawingContext() const; // Deprecated: use drawingCanvas |
121 GraphicsContext* existingDrawingContext() const; | 121 GraphicsContext* existingDrawingContext() const; // Deprecated: use existing
DrawingCanvas |
| 122 SkCanvas* drawingCanvas() const; |
| 123 SkCanvas* existingDrawingCanvas() const; |
122 | 124 |
123 CanvasRenderingContext* renderingContext() const { return m_context.get(); } | 125 CanvasRenderingContext* renderingContext() const { return m_context.get(); } |
124 | 126 |
125 void ensureUnacceleratedImageBuffer(); | 127 void ensureUnacceleratedImageBuffer(); |
126 ImageBuffer* buffer() const; | 128 ImageBuffer* buffer() const; |
127 PassRefPtr<Image> copiedImage(SourceDrawingBuffer) const; | 129 PassRefPtr<Image> copiedImage(SourceDrawingBuffer) const; |
128 void clearCopiedImage(); | 130 void clearCopiedImage(); |
129 | 131 |
130 SecurityOrigin* securityOrigin() const; | 132 SecurityOrigin* securityOrigin() const; |
131 bool originClean() const; | 133 bool originClean() const; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 bool m_imageBufferIsClear; | 213 bool m_imageBufferIsClear; |
212 OwnPtr<ImageBuffer> m_imageBuffer; | 214 OwnPtr<ImageBuffer> m_imageBuffer; |
213 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; | 215 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; |
214 | 216 |
215 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 217 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
216 }; | 218 }; |
217 | 219 |
218 } // namespace blink | 220 } // namespace blink |
219 | 221 |
220 #endif // HTMLCanvasElement_h | 222 #endif // HTMLCanvasElement_h |
OLD | NEW |