| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // The spec for HTMLCanvasElement.getContext() defines the context | 5 // The spec for HTMLCanvasElement.getContext() defines the context |
| 6 // creation attributes as type "any". In order to eliminate custom | 6 // creation attributes as type "any". In order to eliminate custom |
| 7 // bindings for getContext(), we define a dictionary that contains the | 7 // bindings for getContext(), we define a dictionary that contains the |
| 8 // union of all of the context types' attributes. Note that it is not | 8 // union of all of the context types' attributes. Note that it is not |
| 9 // possible to use a union type for this purpose because two dictionary | 9 // possible to use a union type for this purpose because two dictionary |
| 10 // types are not distinguishable. | 10 // types are not distinguishable. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 [RuntimeEnabled=ExperimentalCanvasFeatures] CanvasPixelFormat pixelFormat =
"8-8-8-8"; | 44 [RuntimeEnabled=ExperimentalCanvasFeatures] CanvasPixelFormat pixelFormat =
"8-8-8-8"; |
| 45 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean linearPixelMath = false; | 45 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean linearPixelMath = false; |
| 46 | 46 |
| 47 // WebGL attributes | 47 // WebGL attributes |
| 48 boolean depth = true; | 48 boolean depth = true; |
| 49 boolean stencil = false; | 49 boolean stencil = false; |
| 50 boolean antialias = true; | 50 boolean antialias = true; |
| 51 boolean premultipliedAlpha = true; | 51 boolean premultipliedAlpha = true; |
| 52 boolean preserveDrawingBuffer = false; | 52 boolean preserveDrawingBuffer = false; |
| 53 boolean failIfMajorPerformanceCaveat = false; | 53 boolean failIfMajorPerformanceCaveat = false; |
| 54 |
| 55 // texture. |
| 56 [RuntimeEnabled=ExperimentalCanvasFeatures] any texture = null; |
| 54 }; | 57 }; |
| OLD | NEW |