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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 | 54 |
55 class CORE_EXPORT CanvasRenderingContext | 55 class CORE_EXPORT CanvasRenderingContext |
56 : public GarbageCollectedFinalized<CanvasRenderingContext>, | 56 : public GarbageCollectedFinalized<CanvasRenderingContext>, |
57 public ScriptWrappable { | 57 public ScriptWrappable { |
58 WTF_MAKE_NONCOPYABLE(CanvasRenderingContext); | 58 WTF_MAKE_NONCOPYABLE(CanvasRenderingContext); |
59 USING_PRE_FINALIZER(CanvasRenderingContext, dispose); | 59 USING_PRE_FINALIZER(CanvasRenderingContext, dispose); |
60 | 60 |
61 public: | 61 public: |
62 virtual ~CanvasRenderingContext() {} | 62 virtual ~CanvasRenderingContext() {} |
63 | 63 |
64 // A Canvas can either be "2D" or "webgl" but never both. If you request a 2D canvas and the existing | 64 // A Canvas can either be "2D" or "webgl" but never both. If you request a 2D |
65 // context is already 2D, just return that. If the existing context is WebGL, then destroy it | 65 // canvas and the existing |
Justin Novosad
2016/10/03 18:13:11
More effort needed for this paragraph.
| |
66 // before creating a new 2D context. Vice versa when requesting a WebGL canvas . Requesting a | 66 // context is already 2D, just return that. If the existing context is WebGL, |
67 // then destroy it | |
68 // before creating a new 2D context. Vice versa when requesting a WebGL | |
69 // canvas. Requesting a | |
67 // context with any other type string will destroy any existing context. | 70 // context with any other type string will destroy any existing context. |
68 enum ContextType { | 71 enum ContextType { |
69 // Do not change assigned numbers of existing items: add new features to the end of the list. | 72 // Do not change assigned numbers of existing items: add new features to the |
73 // end of the list. | |
70 Context2d = 0, | 74 Context2d = 0, |
71 ContextExperimentalWebgl = 2, | 75 ContextExperimentalWebgl = 2, |
72 ContextWebgl = 3, | 76 ContextWebgl = 3, |
73 ContextWebgl2 = 4, | 77 ContextWebgl2 = 4, |
74 ContextImageBitmap = 5, | 78 ContextImageBitmap = 5, |
75 ContextTypeCount, | 79 ContextTypeCount, |
76 }; | 80 }; |
77 | 81 |
78 static ContextType contextTypeFromId(const String& id); | 82 static ContextType contextTypeFromId(const String& id); |
79 static ContextType resolveContextTypeAliases(ContextType); | 83 static ContextType resolveContextTypeAliases(ContextType); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 Member<OffscreenCanvas> m_offscreenCanvas; | 189 Member<OffscreenCanvas> m_offscreenCanvas; |
186 HashSet<String> m_cleanURLs; | 190 HashSet<String> m_cleanURLs; |
187 HashSet<String> m_dirtyURLs; | 191 HashSet<String> m_dirtyURLs; |
188 CanvasColorSpace m_colorSpace; | 192 CanvasColorSpace m_colorSpace; |
189 CanvasContextCreationAttributes m_creationAttributes; | 193 CanvasContextCreationAttributes m_creationAttributes; |
190 }; | 194 }; |
191 | 195 |
192 } // namespace blink | 196 } // namespace blink |
193 | 197 |
194 #endif | 198 #endif |
OLD | NEW |