Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: Source/core/html/canvas/WebGLContextAttributes.h

Issue 15481002: Make WebGL objects scriptwrappable so that binding integrity checks may be applied to them. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix WebGLProgram really really. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * * Redistributions of source code must retain the above copyright 7 * * 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 * * Redistributions in binary form must reproduce the above 9 * * Redistributions in binary form must reproduce the above
10 * copyright notice, this list of conditions and the following disclaimer 10 * copyright notice, this list of conditions and the following disclaimer
11 * in the documentation and/or other materials provided with the 11 * in the documentation and/or other materials provided with the
12 * distribution. 12 * distribution.
13 * 13 *
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef WebGLContextAttributes_h 27 #ifndef WebGLContextAttributes_h
28 #define WebGLContextAttributes_h 28 #define WebGLContextAttributes_h
29 29
30 #include "bindings/v8/ScriptWrappable.h"
30 #include "core/html/canvas/CanvasContextAttributes.h" 31 #include "core/html/canvas/CanvasContextAttributes.h"
31 #include "core/platform/graphics/GraphicsContext3D.h" 32 #include "core/platform/graphics/GraphicsContext3D.h"
32 #include <wtf/PassRefPtr.h> 33 #include "wtf/PassRefPtr.h"
33 34
34 namespace WebCore { 35 namespace WebCore {
35 36
36 class WebGLContextAttributes : public CanvasContextAttributes { 37 class WebGLContextAttributes : public CanvasContextAttributes, public ScriptWrap pable {
37 public: 38 public:
38 virtual ~WebGLContextAttributes(); 39 virtual ~WebGLContextAttributes();
39 40
40 // Create a new attributes object 41 // Create a new attributes object
41 static PassRefPtr<WebGLContextAttributes> create(); 42 static PassRefPtr<WebGLContextAttributes> create();
42 43
43 // Create a new attributes object initialized with preexisting attributes 44 // Create a new attributes object initialized with preexisting attributes
44 static PassRefPtr<WebGLContextAttributes> create(GraphicsContext3D::Attribut es attributes); 45 static PassRefPtr<WebGLContextAttributes> create(GraphicsContext3D::Attribut es attributes);
45 46
46 // Whether or not the drawing buffer has an alpha channel; default=true 47 // Whether or not the drawing buffer has an alpha channel; default=true
47 bool alpha() const; 48 bool alpha() const;
(...skipping 19 matching lines...) Expand all
67 68
68 // Whether or not to preserve the drawing buffer after presentation to the 69 // Whether or not to preserve the drawing buffer after presentation to the
69 // screen; default=false 70 // screen; default=false
70 bool preserveDrawingBuffer() const; 71 bool preserveDrawingBuffer() const;
71 void setPreserveDrawingBuffer(bool); 72 void setPreserveDrawingBuffer(bool);
72 73
73 // Fetches a copy of the attributes stored in this object in a 74 // Fetches a copy of the attributes stored in this object in a
74 // form that can be used to initialize a GraphicsContext3D. 75 // form that can be used to initialize a GraphicsContext3D.
75 GraphicsContext3D::Attributes attributes() const; 76 GraphicsContext3D::Attributes attributes() const;
76 77
77 protected: 78 protected:
78 WebGLContextAttributes(); 79 WebGLContextAttributes();
79 WebGLContextAttributes(GraphicsContext3D::Attributes attributes); 80 WebGLContextAttributes(GraphicsContext3D::Attributes attributes);
80 81
81 private: 82 private:
82 GraphicsContext3D::Attributes m_attrs; 83 GraphicsContext3D::Attributes m_attrs;
83 }; 84 };
84 85
85 } // namespace WebCore 86 } // namespace WebCore
86 87
87 #endif // WebGLContextAttributes_h 88 #endif // WebGLContextAttributes_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLCompressedTextureS3TC.cpp ('k') | Source/core/html/canvas/WebGLContextAttributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698