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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 m_ignoreReset = true; | 103 m_ignoreReset = true; |
104 setWidth(newSize.width()); | 104 setWidth(newSize.width()); |
105 setHeight(newSize.height()); | 105 setHeight(newSize.height()); |
106 m_ignoreReset = false; | 106 m_ignoreReset = false; |
107 reset(); | 107 reset(); |
108 } | 108 } |
109 | 109 |
110 // Called by HTMLCanvasElement's V8 bindings. | 110 // Called by HTMLCanvasElement's V8 bindings. |
111 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat ionAttributes&); | 111 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat ionAttributes&); |
112 // Called by Document::getCSSCanvasContext as well as above getContext(). | 112 // Called by Document::getCSSCanvasContext as well as above getContext(). |
113 CanvasRenderingContext* getCanvasRenderingContext(const String&, const Canva sContextCreationAttributes&); | 113 // The WebGLRenderingContext requires a non-null ScriptState, but the Canvas 2DRenderingContext does not. |
haraken
2015/10/13 02:02:04
In general, it is not nice to pass a nullptr to Sc
| |
114 CanvasRenderingContext* getCanvasRenderingContext(ScriptState*, const String &, const CanvasContextCreationAttributes&); | |
114 | 115 |
115 bool isPaintable() const; | 116 bool isPaintable() const; |
116 | 117 |
117 static String toEncodingMimeType(const String& mimeType); | 118 static String toEncodingMimeType(const String& mimeType); |
118 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const; | 119 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const; |
119 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, ScriptValue(), exceptionState); } | 120 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, ScriptValue(), exceptionState); } |
120 | 121 |
121 void toBlob(FileCallback*, const String& mimeType, const ScriptValue& qualit yArgument, ExceptionState&); | 122 void toBlob(FileCallback*, const String& mimeType, const ScriptValue& qualit yArgument, ExceptionState&); |
122 void toBlob(FileCallback* callback, const String& mimeType, ExceptionState& exceptionState) { return toBlob(callback, mimeType, ScriptValue(), exceptionStat e); } | 123 void toBlob(FileCallback* callback, const String& mimeType, ExceptionState& exceptionState) { return toBlob(callback, mimeType, ScriptValue(), exceptionStat e); } |
123 | 124 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 mutable bool m_didFailToCreateImageBuffer; | 240 mutable bool m_didFailToCreateImageBuffer; |
240 bool m_imageBufferIsClear; | 241 bool m_imageBufferIsClear; |
241 OwnPtr<ImageBuffer> m_imageBuffer; | 242 OwnPtr<ImageBuffer> m_imageBuffer; |
242 | 243 |
243 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). | 244 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). |
244 }; | 245 }; |
245 | 246 |
246 } // namespace blink | 247 } // namespace blink |
247 | 248 |
248 #endif // HTMLCanvasElement_h | 249 #endif // HTMLCanvasElement_h |
OLD | NEW |