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

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

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Smaller adjustments Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "wtf/text/WTFString.h" 42 #include "wtf/text/WTFString.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 // A tagged union representing the result of get queries like 46 // A tagged union representing the result of get queries like
47 // getParameter (encompassing getBooleanv, getIntegerv, getFloatv) and 47 // getParameter (encompassing getBooleanv, getIntegerv, getFloatv) and
48 // similar variants. For reference counted types, increments and 48 // similar variants. For reference counted types, increments and
49 // decrements the reference count of the target object. 49 // decrements the reference count of the target object.
50 50
51 class WebGLGetInfo FINAL { 51 class WebGLGetInfo FINAL {
52 STACK_ALLOCATED();
52 public: 53 public:
53 enum Type { 54 enum Type {
54 kTypeBool, 55 kTypeBool,
55 kTypeBoolArray, 56 kTypeBoolArray,
56 kTypeFloat, 57 kTypeFloat,
57 kTypeInt, 58 kTypeInt,
58 kTypeNull, 59 kTypeNull,
59 kTypeString, 60 kTypeString,
60 kTypeUnsignedInt, 61 kTypeUnsignedInt,
61 kTypeWebGLBuffer, 62 kTypeWebGLBuffer,
(...skipping 10 matching lines...) Expand all
72 }; 73 };
73 74
74 explicit WebGLGetInfo(bool value); 75 explicit WebGLGetInfo(bool value);
75 WebGLGetInfo(const bool* value, int size); 76 WebGLGetInfo(const bool* value, int size);
76 explicit WebGLGetInfo(float value); 77 explicit WebGLGetInfo(float value);
77 explicit WebGLGetInfo(int value); 78 explicit WebGLGetInfo(int value);
78 // Represents the null value and type. 79 // Represents the null value and type.
79 WebGLGetInfo(); 80 WebGLGetInfo();
80 explicit WebGLGetInfo(const String& value); 81 explicit WebGLGetInfo(const String& value);
81 explicit WebGLGetInfo(unsigned value); 82 explicit WebGLGetInfo(unsigned value);
82 explicit WebGLGetInfo(PassRefPtr<WebGLBuffer> value); 83 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLBuffer> value);
83 explicit WebGLGetInfo(PassRefPtr<Float32Array> value); 84 explicit WebGLGetInfo(PassRefPtr<Float32Array> value);
84 explicit WebGLGetInfo(PassRefPtr<WebGLFramebuffer> value); 85 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLFramebuffer> value);
85 explicit WebGLGetInfo(PassRefPtr<Int32Array> value); 86 explicit WebGLGetInfo(PassRefPtr<Int32Array> value);
86 // FIXME: implement WebGLObjectArray 87 // FIXME: implement WebGLObjectArray
87 // WebGLGetInfo(PassRefPtr<WebGLObjectArray> value); 88 // WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLObjectArray> value);
88 explicit WebGLGetInfo(PassRefPtr<WebGLProgram> value); 89 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLProgram> value);
89 explicit WebGLGetInfo(PassRefPtr<WebGLRenderbuffer> value); 90 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLRenderbuffer> value);
90 explicit WebGLGetInfo(PassRefPtr<WebGLTexture> value); 91 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLTexture> value);
91 explicit WebGLGetInfo(PassRefPtr<Uint8Array> value); 92 explicit WebGLGetInfo(PassRefPtr<Uint8Array> value);
92 explicit WebGLGetInfo(PassRefPtr<Uint32Array> value); 93 explicit WebGLGetInfo(PassRefPtr<Uint32Array> value);
93 explicit WebGLGetInfo(PassRefPtr<WebGLVertexArrayObjectOES> value); 94 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> valu e);
94 95
95 Type getType() const; 96 Type getType() const;
96 97
97 bool getBool() const; 98 bool getBool() const;
98 const Vector<bool>& getBoolArray() const; 99 const Vector<bool>& getBoolArray() const;
99 float getFloat() const; 100 float getFloat() const;
100 int getInt() const; 101 int getInt() const;
101 const String& getString() const; 102 const String& getString() const;
102 unsigned getUnsignedInt() const; 103 unsigned getUnsignedInt() const;
103 PassRefPtr<WebGLBuffer> getWebGLBuffer() const; 104 PassRefPtrWillBeRawPtr<WebGLBuffer> getWebGLBuffer() const;
104 PassRefPtr<Float32Array> getWebGLFloatArray() const; 105 PassRefPtr<Float32Array> getWebGLFloatArray() const;
105 PassRefPtr<WebGLFramebuffer> getWebGLFramebuffer() const; 106 PassRefPtrWillBeRawPtr<WebGLFramebuffer> getWebGLFramebuffer() const;
106 PassRefPtr<Int32Array> getWebGLIntArray() const; 107 PassRefPtr<Int32Array> getWebGLIntArray() const;
107 // FIXME: implement WebGLObjectArray 108 // FIXME: implement WebGLObjectArray
108 // PassRefPtr<WebGLObjectArray> getWebGLObjectArray() const; 109 // PassRefPtr<WebGLObjectArray> getWebGLObjectArray() const;
109 PassRefPtr<WebGLProgram> getWebGLProgram() const; 110 PassRefPtrWillBeRawPtr<WebGLProgram> getWebGLProgram() const;
110 PassRefPtr<WebGLRenderbuffer> getWebGLRenderbuffer() const; 111 PassRefPtrWillBeRawPtr<WebGLRenderbuffer> getWebGLRenderbuffer() const;
111 PassRefPtr<WebGLTexture> getWebGLTexture() const; 112 PassRefPtrWillBeRawPtr<WebGLTexture> getWebGLTexture() const;
112 PassRefPtr<Uint8Array> getWebGLUnsignedByteArray() const; 113 PassRefPtr<Uint8Array> getWebGLUnsignedByteArray() const;
113 PassRefPtr<Uint32Array> getWebGLUnsignedIntArray() const; 114 PassRefPtr<Uint32Array> getWebGLUnsignedIntArray() const;
114 PassRefPtr<WebGLVertexArrayObjectOES> getWebGLVertexArrayObjectOES() const; 115 PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> getWebGLVertexArrayObjectO ES() const;
115 116
116 private: 117 private:
117 Type m_type; 118 Type m_type;
118 bool m_bool; 119 bool m_bool;
119 Vector<bool> m_boolArray; 120 Vector<bool> m_boolArray;
120 float m_float; 121 float m_float;
121 int m_int; 122 int m_int;
122 String m_string; 123 String m_string;
123 unsigned m_unsignedInt; 124 unsigned m_unsignedInt;
124 RefPtr<WebGLBuffer> m_webglBuffer; 125 RefPtrWillBeMember<WebGLBuffer> m_webglBuffer;
125 RefPtr<Float32Array> m_webglFloatArray; 126 RefPtr<Float32Array> m_webglFloatArray;
126 RefPtr<WebGLFramebuffer> m_webglFramebuffer; 127 RefPtrWillBeMember<WebGLFramebuffer> m_webglFramebuffer;
127 RefPtr<Int32Array> m_webglIntArray; 128 RefPtr<Int32Array> m_webglIntArray;
128 // FIXME: implement WebGLObjectArray 129 // FIXME: implement WebGLObjectArray
129 // RefPtr<WebGLObjectArray> m_webglObjectArray; 130 // RefPtr<WebGLObjectArray> m_webglObjectArray;
130 RefPtr<WebGLProgram> m_webglProgram; 131 RefPtrWillBeMember<WebGLProgram> m_webglProgram;
131 RefPtr<WebGLRenderbuffer> m_webglRenderbuffer; 132 RefPtrWillBeMember<WebGLRenderbuffer> m_webglRenderbuffer;
132 RefPtr<WebGLTexture> m_webglTexture; 133 RefPtrWillBeMember<WebGLTexture> m_webglTexture;
133 RefPtr<Uint8Array> m_webglUnsignedByteArray; 134 RefPtr<Uint8Array> m_webglUnsignedByteArray;
134 RefPtr<Uint32Array> m_webglUnsignedIntArray; 135 RefPtr<Uint32Array> m_webglUnsignedIntArray;
135 RefPtr<WebGLVertexArrayObjectOES> m_webglVertexArrayObject; 136 RefPtrWillBeMember<WebGLVertexArrayObjectOES> m_webglVertexArrayObject;
136 }; 137 };
137 138
138 } // namespace blink 139 } // namespace blink
139 140
140 #endif // WebGLGetInfo_h 141 #endif // WebGLGetInfo_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698