| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 reset(); | 101 reset(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 // Called by HTMLCanvasElement's V8 bindings. | 104 // Called by HTMLCanvasElement's V8 bindings. |
| 105 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat
ionAttributes&); | 105 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat
ionAttributes&); |
| 106 // Called by Document::getCSSCanvasContext as well as above getContext() var
iant. | 106 // Called by Document::getCSSCanvasContext as well as above getContext() var
iant. |
| 107 void getContext(const String&, const CanvasContextCreationAttributes&, Canva
sRenderingContext2DOrWebGLRenderingContext&); | 107 void getContext(const String&, const CanvasContextCreationAttributes&, Canva
sRenderingContext2DOrWebGLRenderingContext&); |
| 108 bool isPaintable() const; | 108 bool isPaintable() const; |
| 109 | 109 |
| 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 ScriptValue& qualityArgument,
ExceptionState&) 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, ScriptValue(), 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; // Deprecated: use drawingCanvas | 120 GraphicsContext* drawingContext() const; // Deprecated: use drawingCanvas |
| 121 GraphicsContext* existingDrawingContext() const; // Deprecated: use existing
DrawingCanvas | 121 GraphicsContext* existingDrawingContext() const; // Deprecated: use existing
DrawingCanvas |
| 122 SkCanvas* drawingCanvas() const; | 122 SkCanvas* drawingCanvas() const; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 bool m_imageBufferIsClear; | 213 bool m_imageBufferIsClear; |
| 214 OwnPtr<ImageBuffer> m_imageBuffer; | 214 OwnPtr<ImageBuffer> m_imageBuffer; |
| 215 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; | 215 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; |
| 216 | 216 |
| 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). | 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). |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace blink | 220 } // namespace blink |
| 221 | 221 |
| 222 #endif // HTMLCanvasElement_h | 222 #endif // HTMLCanvasElement_h |
| OLD | NEW |