OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 static ContextType resolveContextTypeAliases(ContextType); | 81 static ContextType resolveContextTypeAliases(ContextType); |
82 | 82 |
83 HTMLCanvasElement* canvas() const { return m_canvas; } | 83 HTMLCanvasElement* canvas() const { return m_canvas; } |
84 | 84 |
85 CanvasColorSpace colorSpace() const { return m_colorSpace; }; | 85 CanvasColorSpace colorSpace() const { return m_colorSpace; }; |
86 WTF::String colorSpaceAsString() const; | 86 WTF::String colorSpaceAsString() const; |
87 sk_sp<SkColorSpace> skColorSpace() const; | 87 sk_sp<SkColorSpace> skColorSpace() const; |
88 | 88 |
89 virtual PassRefPtr<Image> getImage(AccelerationHint, | 89 virtual PassRefPtr<Image> getImage(AccelerationHint, |
90 SnapshotReason) const = 0; | 90 SnapshotReason) const = 0; |
| 91 virtual ImageData* toImageData(SnapshotReason reason) const { |
| 92 return nullptr; |
| 93 } |
91 virtual ContextType getContextType() const = 0; | 94 virtual ContextType getContextType() const = 0; |
92 virtual bool isAccelerated() const { return false; } | 95 virtual bool isAccelerated() const { return false; } |
93 virtual bool shouldAntialias() const { return false; } | 96 virtual bool shouldAntialias() const { return false; } |
94 virtual void setIsHidden(bool) = 0; | 97 virtual void setIsHidden(bool) = 0; |
95 virtual bool isContextLost() const { return true; } | 98 virtual bool isContextLost() const { return true; } |
96 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); }; | 99 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); }; |
97 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { | 100 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { |
98 NOTREACHED(); | 101 NOTREACHED(); |
99 } | 102 } |
100 virtual bool isPaintable() const = 0; | 103 virtual bool isPaintable() const = 0; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 Member<OffscreenCanvas> m_offscreenCanvas; | 190 Member<OffscreenCanvas> m_offscreenCanvas; |
188 HashSet<String> m_cleanURLs; | 191 HashSet<String> m_cleanURLs; |
189 HashSet<String> m_dirtyURLs; | 192 HashSet<String> m_dirtyURLs; |
190 CanvasColorSpace m_colorSpace; | 193 CanvasColorSpace m_colorSpace; |
191 CanvasContextCreationAttributes m_creationAttributes; | 194 CanvasContextCreationAttributes m_creationAttributes; |
192 }; | 195 }; |
193 | 196 |
194 } // namespace blink | 197 } // namespace blink |
195 | 198 |
196 #endif | 199 #endif |
OLD | NEW |