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

Side by Side Diff: Source/web/tests/MockWebGraphicsContext3D.h

Issue 106503003: Changed GL enums from GraphicsContext3D to standard versions (Take 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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
« no previous file with comments | « Source/web/tests/DrawingBufferTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual void blendEquation(WGC3Denum mode) { } 78 virtual void blendEquation(WGC3Denum mode) { }
79 virtual void blendEquationSeparate(WGC3Denum modeRGB, WGC3Denum modeAlpha) { } 79 virtual void blendEquationSeparate(WGC3Denum modeRGB, WGC3Denum modeAlpha) { }
80 virtual void blendFunc(WGC3Denum sfactor, WGC3Denum dfactor) { } 80 virtual void blendFunc(WGC3Denum sfactor, WGC3Denum dfactor) { }
81 virtual void blendFuncSeparate(WGC3Denum srcRGB, WGC3Denum dstRGB, WGC3Denum srcAlpha, WGC3Denum dstAlpha) { } 81 virtual void blendFuncSeparate(WGC3Denum srcRGB, WGC3Denum dstRGB, WGC3Denum srcAlpha, WGC3Denum dstAlpha) { }
82 82
83 virtual void bufferData(WGC3Denum target, WGC3Dsizeiptr size, const void* da ta, WGC3Denum usage) { } 83 virtual void bufferData(WGC3Denum target, WGC3Dsizeiptr size, const void* da ta, WGC3Denum usage) { }
84 virtual void bufferSubData(WGC3Denum target, WGC3Dintptr offset, WGC3Dsizeip tr size, const void* data) { } 84 virtual void bufferSubData(WGC3Denum target, WGC3Dintptr offset, WGC3Dsizeip tr size, const void* data) { }
85 85
86 virtual WGC3Denum checkFramebufferStatus(WGC3Denum target) 86 virtual WGC3Denum checkFramebufferStatus(WGC3Denum target)
87 { 87 {
88 return WebCore::GraphicsContext3D::FRAMEBUFFER_COMPLETE; 88 return GL_FRAMEBUFFER_COMPLETE;
89 } 89 }
90 90
91 virtual void clear(WGC3Dbitfield mask) { } 91 virtual void clear(WGC3Dbitfield mask) { }
92 virtual void clearColor(WGC3Dclampf red, WGC3Dclampf green, WGC3Dclampf blue , WGC3Dclampf alpha) { } 92 virtual void clearColor(WGC3Dclampf red, WGC3Dclampf green, WGC3Dclampf blue , WGC3Dclampf alpha) { }
93 virtual void clearDepth(WGC3Dclampf depth) { } 93 virtual void clearDepth(WGC3Dclampf depth) { }
94 virtual void clearStencil(WGC3Dint s) { } 94 virtual void clearStencil(WGC3Dint s) { }
95 virtual void colorMask(WGC3Dboolean red, WGC3Dboolean green, WGC3Dboolean bl ue, WGC3Dboolean alpha) { } 95 virtual void colorMask(WGC3Dboolean red, WGC3Dboolean green, WGC3Dboolean bl ue, WGC3Dboolean alpha) { }
96 virtual void compileShader(WebGLId shader) { } 96 virtual void compileShader(WebGLId shader) { }
97 97
98 virtual void compressedTexImage2D(WGC3Denum target, WGC3Dint level, WGC3Denu m internalformat, WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border, WGC3Dsiz ei imageSize, const void* data) { } 98 virtual void compressedTexImage2D(WGC3Denum target, WGC3Dint level, WGC3Denu m internalformat, WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border, WGC3Dsiz ei imageSize, const void* data) { }
(...skipping 25 matching lines...) Expand all
124 virtual WGC3Dint getAttribLocation(WebGLId program, const WGC3Dchar* name) { return 0; } 124 virtual WGC3Dint getAttribLocation(WebGLId program, const WGC3Dchar* name) { return 0; }
125 virtual void getBooleanv(WGC3Denum pname, WGC3Dboolean* value) { } 125 virtual void getBooleanv(WGC3Denum pname, WGC3Dboolean* value) { }
126 virtual void getBufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Din t* value) { } 126 virtual void getBufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Din t* value) { }
127 virtual Attributes getContextAttributes() { return m_attrs; } 127 virtual Attributes getContextAttributes() { return m_attrs; }
128 virtual WGC3Denum getError() { return 0; } 128 virtual WGC3Denum getError() { return 0; }
129 virtual void getFloatv(WGC3Denum pname, WGC3Dfloat* value) { } 129 virtual void getFloatv(WGC3Denum pname, WGC3Dfloat* value) { }
130 virtual void getFramebufferAttachmentParameteriv(WGC3Denum target, WGC3Denum attachment, WGC3Denum pname, WGC3Dint* value) { } 130 virtual void getFramebufferAttachmentParameteriv(WGC3Denum target, WGC3Denum attachment, WGC3Denum pname, WGC3Dint* value) { }
131 131
132 virtual void getIntegerv(WGC3Denum pname, WGC3Dint* value) 132 virtual void getIntegerv(WGC3Denum pname, WGC3Dint* value)
133 { 133 {
134 if (pname == WebCore::GraphicsContext3D::MAX_TEXTURE_SIZE) 134 if (pname == GL_MAX_TEXTURE_SIZE)
135 *value = 1024; 135 *value = 1024;
136 } 136 }
137 137
138 virtual void getProgramiv(WebGLId program, WGC3Denum pname, WGC3Dint* value) 138 virtual void getProgramiv(WebGLId program, WGC3Denum pname, WGC3Dint* value)
139 { 139 {
140 if (pname == WebCore::GraphicsContext3D::LINK_STATUS) 140 if (pname == GL_LINK_STATUS)
141 *value = 1; 141 *value = 1;
142 } 142 }
143 143
144 virtual WebString getProgramInfoLog(WebGLId program) { return WebString(); } 144 virtual WebString getProgramInfoLog(WebGLId program) { return WebString(); }
145 virtual void getRenderbufferParameteriv(WGC3Denum target, WGC3Denum pname, W GC3Dint* value) { } 145 virtual void getRenderbufferParameteriv(WGC3Denum target, WGC3Denum pname, W GC3Dint* value) { }
146 146
147 virtual void getShaderiv(WebGLId shader, WGC3Denum pname, WGC3Dint* value) 147 virtual void getShaderiv(WebGLId shader, WGC3Denum pname, WGC3Dint* value)
148 { 148 {
149 if (pname == WebCore::GraphicsContext3D::COMPILE_STATUS) 149 if (pname == GL_COMPILE_STATUS)
150 *value = 1; 150 *value = 1;
151 } 151 }
152 152
153 virtual WebString getShaderInfoLog(WebGLId shader) { return WebString(); } 153 virtual WebString getShaderInfoLog(WebGLId shader) { return WebString(); }
154 virtual void getShaderPrecisionFormat(WGC3Denum shadertype, WGC3Denum precis iontype, WGC3Dint* range, WGC3Dint* precision) { } 154 virtual void getShaderPrecisionFormat(WGC3Denum shadertype, WGC3Denum precis iontype, WGC3Dint* range, WGC3Dint* precision) { }
155 virtual WebString getShaderSource(WebGLId shader) { return WebString(); } 155 virtual WebString getShaderSource(WebGLId shader) { return WebString(); }
156 virtual WebString getString(WGC3Denum name) { return WebString(); } 156 virtual WebString getString(WGC3Denum name) { return WebString(); }
157 virtual void getTexParameterfv(WGC3Denum target, WGC3Denum pname, WGC3Dfloat * value) { } 157 virtual void getTexParameterfv(WGC3Denum target, WGC3Denum pname, WGC3Dfloat * value) { }
158 virtual void getTexParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { } 158 virtual void getTexParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) { }
159 virtual void getUniformfv(WebGLId program, WGC3Dint location, WGC3Dfloat* va lue) { } 159 virtual void getUniformfv(WebGLId program, WGC3Dint location, WGC3Dfloat* va lue) { }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 virtual void getQueryObjectuivEXT(WebGLId, GC3Denum, GC3Duint*) { } 286 virtual void getQueryObjectuivEXT(WebGLId, GC3Denum, GC3Duint*) { }
287 287
288 protected: 288 protected:
289 unsigned m_nextTextureId; 289 unsigned m_nextTextureId;
290 Attributes m_attrs; 290 Attributes m_attrs;
291 }; 291 };
292 292
293 } // namespace blink 293 } // namespace blink
294 294
295 #endif // MockWebGraphicsContext3D_h 295 #endif // MockWebGraphicsContext3D_h
OLDNEW
« no previous file with comments | « Source/web/tests/DrawingBufferTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698